Posted by Executor2 on February 19, 1998 at 19:36:21:
Hey, CogKing! I could use your help again :) here's the whole cog file:
# Jedi Knight Cog Script symbols surface switch desc=switch thing tdg1 nolink,desc=tdg1 int rounds=2 desc=Rounds flex rate=0.1 desc=Rate int firing=0 local template proj_tpl=strifle sound on_snd=set_hi2.wav local message activated # ======================================================================================== code activated: firing = 1; dummy = SetWallCel(switch, 0); firing = 0; DestroyThing(GetSenderId()); Return; end ================================================================ Ok, so, now the stupid switch that it's associated to doesn't switch. What's wrong, eh? You directions didn't tell me exactle where to put that stuff :)
#
# Modified m2_dettrap.cog
#
# When switch is pressed, it will create 20 objects in 20 ghost places,
# then, after
# For non-disappearing objects, set
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Original Idea - Didn't work!
# [YB/JS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================
thing tdg2 nolink,desc=tdg2
thing tdg3 nolink,desc=tdg3
thing tdg4 nolink,desc=tdg4
flex delay=3.0 desc=Delay
int cur_round=0 local
int dummy local
sound off_snd=lgclick1.wav local
end
if(firing == 1) Return;
dummy = SetWallCel(switch, 1);
dummy = PlaySoundPos(on_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
thing1 = CreateThing(proj_tpl, tdg1);
SetTimerEx(delay, thing1, 0, 0);
thing2 = CreateThing(proj_tpl, tdg2);
SetTimerEx(delay, thing2, 0, 0);
thing3 = CreateThing(proj_tpl, tdg3);
SetTimerEx(delay, thing3, 0, 0)
thing4 = CreateThing(proj_tpl, tdg4);
SetTimerEx(delay, thing4, 0, 0)
Sleep(delay);
dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
Return;
timer: