Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → What is wrong with this?
What is wrong with this?
2000-10-22, 5:22 AM #1
I took a TD trap cog out of one of the JK LEC levels and edited it so it would be able to create TD's at more locations. I then entered the thing numbers of the 6 different ghost objects, but only the first too are creating TD's. If you would be so kind as to look at the actual cog listed below and tell me if you see any errors, it would be greatly appreciated. [http://forums.massassi.net/html/smile.gif]

# Jedi Knight Cog Script
#
# M2_dettrap.cog
#
# This will generate a series of 4 TD's per 'round' when
# the switch is activated.
# The trap resets in 'delay' seconds afterwards.
#
# [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
thing tdg5 nolink,desc=tdg5
thing tdg6 nolink,desc=tdg6
thing tdg7 nolink,desc=tdg7
thing tdg8 nolink,desc=tdg8
thing tdg9 nolink,desc=tdg9
thing tdg10 nolink,desc=tdg10

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=+grenade2 local

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


cur_round = 0;
while(cur_round < rounds)
{
dummy = CreateThing(proj_tpl, tdg1);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg2);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg3);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg4);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg5);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg6);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg7);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg8);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg9);
Sleep(rate);
dummy = CreateThing(proj_tpl, tdg10);
Sleep(rate);

cur_round = cur_round + 1;
}

Sleep(delay);
dummy = SetWallCel(switch, 0);
dummy = PlaySoundPos(off_snd, SurfaceCenter(switch), 1.0, 5.0, 10.0, 0);
firing = 0;
Return;

end

-Thank you

------------------
I couldn't put my real email address so I put bla@bla.com. My real email address is rc@mlode.com
haha! -&gt; :eek:
:cool:
2000-10-22, 5:33 AM #2
B.T.W, I just checked it with COG Writer, which reported no errors.

------------------
I couldn't put my real email address so I put bla@bla.com. My real email address is rc@mlode.com
haha! -&gt; :eek:
:cool:
2000-10-22, 5:46 AM #3
Never mind, I solved the problem. The other ghosts wern't in a sector. The strange thing though, is that I used the Consistency Checker and it said all was fine. Oh well, problem fixed. [http://forums.massassi.net/html/smile.gif]

------------------
I couldn't put my real email address so I put bla@bla.com. My real email address is rc@mlode.com
haha! -&gt; :eek:
:cool:
2000-10-22, 5:47 AM #4
i see no error...must be a problem with putting it into the level...check the thingnumbers of the ghosts and if they are assigned to sectors or not (shift+a)...
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)

↑ Up to the top!