Crashing Cog


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]

Posted by Nightmare on October 20, 1998 at 19:33:08:

OK, so I link up this cog in my level. You start out, after a few seconds, you see the "starting" message. Then, as soon as you see the "timer"message, the game crashes and sends you back to the desktop. CogWriter didn't find any errors. Does anyone see anything here that is wrong?

Nightmare


# Jedi Knight Cog Script
# dnli_rand_amb.cog
#
# Plays a random sound at a random ghost popsition at a random interval
#
# 10/20/98 Nightmare
# This COG is not made or supported by LEC

symbols
message startup
message timer

sound sound00
sound sound01
sound sound02
sound sound03
sound sound04
sound sound05
sound sound06
sound sound07
sound sound08
sound sound09

thing ghost00
thing ghost01
thing ghost02
thing ghost03
thing ghost04
thing ghost05
thing ghost06
thing ghost07
thing ghost08
thing ghost09

int numsounds
int numghosts

flex interval
flex interval_rand

int soundnum local
int locationnum local
end

code

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

startup:
sleep(5);
print("starting");
settimer(interval+(rand()*interval_rand));
return;

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

timer:
print("timer");
soundnum = rand()*numsounds;
locationnum = rand()*numghosts;
PlaySoundThing(sound[soundnum], ghost[locationnum], 2.0, -1, -1, 0);
settimer(interval+(rand()*interval_rand));
return;
end




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ The Massassi Temple Message Board ]