This just completely stalled my computer. I think it should work, but it doesn't.
code:
# Jedi Knight Cog Script
#
symbols
thing console desc=console
thing td1 nolink,desc=td1
thing td2 nolink,desc=td2
thing td3 nolink,desc=td3
thing td4 nolink,desc=td4
int rounds=1 desc=rounds
flex rate=0.4 desc=rate
flex delay=8.0 desc=delay
flex health local
flex health1 local
flex health2 local
flex health3 local
int firing=0 local
int cur_round=0 local
int dummy local
int dummy1 local
int dummy2 local
int dummy3 local
template proj_tpl=+force_dest_p4
sound on_snd=Activate04.wav local
message activated
end
# ========================================================================================
code
activated:
if(firing == 1) Return;
firing = 1;
dummy = playsoundthing(on_snd,console,1.0,-1,3.0,0x0);
cur_round = 0;
while(cur_round < rounds)
{
dummy = CreateThing(proj_tpl, td1);
health = GetThingHealth(dummy);
Sleep(rate);
dummy1 = CreateThing(proj_tpl, td2);
health1 = GetThingHealth(dummy1);
Sleep(rate);
dummy2 = CreateThing(proj_tpl, td3);
health2 = GetThingHealth(dummy2);
Sleep(rate);
dummy3 = CreateThing(proj_tpl, td4);
health3 = GetThingHealth(dummy3);
Sleep(rate);
cur_round = cur_round + 1;
}
while(health + health1 + health2 + health3 > 0.0)
{
health = GetThingHealth(dummy);
health1 = GetThingHealth(dummy1);
health2 = GetThingHealth(dummy2);
health3 = GetThingHealth(dummy3);
}
sleep(delay);
firing = 0;
Return;
end
by the way,how do you put code in these things.
code:
# Jedi Knight Cog Script
#
symbols
thing console desc=console
thing td1 nolink,desc=td1
thing td2 nolink,desc=td2
thing td3 nolink,desc=td3
thing td4 nolink,desc=td4
int rounds=1 desc=rounds
flex rate=0.4 desc=rate
flex delay=8.0 desc=delay
flex health local
flex health1 local
flex health2 local
flex health3 local
int firing=0 local
int cur_round=0 local
int dummy local
int dummy1 local
int dummy2 local
int dummy3 local
template proj_tpl=+force_dest_p4
sound on_snd=Activate04.wav local
message activated
end
# ========================================================================================
code
activated:
if(firing == 1) Return;
firing = 1;
dummy = playsoundthing(on_snd,console,1.0,-1,3.0,0x0);
cur_round = 0;
while(cur_round < rounds)
{
dummy = CreateThing(proj_tpl, td1);
health = GetThingHealth(dummy);
Sleep(rate);
dummy1 = CreateThing(proj_tpl, td2);
health1 = GetThingHealth(dummy1);
Sleep(rate);
dummy2 = CreateThing(proj_tpl, td3);
health2 = GetThingHealth(dummy2);
Sleep(rate);
dummy3 = CreateThing(proj_tpl, td4);
health3 = GetThingHealth(dummy3);
Sleep(rate);
cur_round = cur_round + 1;
}
while(health + health1 + health2 + health3 > 0.0)
{
health = GetThingHealth(dummy);
health1 = GetThingHealth(dummy1);
health2 = GetThingHealth(dummy2);
health3 = GetThingHealth(dummy3);
}
sleep(delay);
firing = 0;
Return;
end
by the way,how do you put code in these things.