Still got that COG problem!!!


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]

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
#
# Modified m2_dettrap.cog
#
# When switch is pressed, it will create 20 objects in 20 ghost places,
# then, after seconds, the objects will disappear.
# For non-disappearing objects, set to -1.
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Original Idea - Didn't work!
# [YB/JS]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
# ========================================================================================

symbols

surface switch desc=switch

thing tdg1 nolink,desc=tdg1
thing tdg2 nolink,desc=tdg2
thing tdg3 nolink,desc=tdg3
thing tdg4 nolink,desc=tdg4

int rounds=2 desc=Rounds

flex rate=0.1 desc=Rate
flex delay=3.0 desc=Delay

int firing=0 local
int cur_round=0 local
int dummy local

template proj_tpl=strifle

sound on_snd=set_hi2.wav local
sound off_snd=lgclick1.wav local

message activated


end

# ========================================================================================

code

activated:
if(firing == 1) Return;

firing = 1;
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 = SetWallCel(switch, 0);
dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);

firing = 0;
Return;


timer:

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 :)


Follow Ups:



Post a Followup

Name:
E-Mail:
Subject:
Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Jed Messages ]