PDA

View Full Version : This causes my level to crash -- why?



Wolfy
06-27-2004, 09:08 AM
I put this little dandy together because I suspected I had too many COGs loaded for JK to handle, and so I decided to compile a bunch of my ai_sleep.cog files into one file.

However, upon start-up, this COG, and one similar to it (less four "thugs"), causes the level to crash on start-up. Any help would be appreciated. Yes, all thing slots and sector slots are filled.


# Jedi Knight Cog Script
#
# filename.cog
#
# Combines ai_sleep.cog into one nice file.
# I...hate...COG. God damn you, Justin Chin, and your long-gone development team!
#
#
# This Cog is Not supported by LucasArts Entertainment Co

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

symbols

message startup
message entered
message user0

sector trigger

thing thug0
thing thug1
thing thug2
thing thug3
thing thug4
thing thug5
thing thug6
thing thug7
thing thug8
thing thug9
thing thug10
thing thug11
thing thug12
thing thug13
thing thug14
thing thug15
thing thug16
thing thug17
thing thug18

int awake=0 local
int i=0 local

end

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

code

startup:
Sleep(1.0);
for(i=0; i < 19; i=i+1)
{
AiSetMode(thug[i], 0x2000);
}
return;

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

entered:
for(i=0; i < 19; i=i+1)
{
AIClearMode(thug[i], 0x2000);
AISetMode(thug[i], 0x200);
}
return;

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

user0:
call entered;
return;

end

------------------
<ubuu> does hitler have a last name?
<jipe> .. yes, Ubuu, we're racist commy nazi jews, and we hate male pattern baldness
<Professor`K> Sorry, but half-way through your logic, my head exploded

[This message has been edited by Wolfy (edited June 27, 2004).]

Wolfy
06-27-2004, 09:16 AM
Upon further inspection, I believe the for/next stuff is crashing the level.

------------------
<ubuu> does hitler have a last name?
<jipe> .. yes, Ubuu, we're racist commy nazi jews, and we hate male pattern baldness
<Professor`K> Sorry, but half-way through your logic, my head exploded

Wolfy
06-27-2004, 10:50 AM
Nevermind, I fixed it. Instead, go here (http://forums.massassi.net/html/Forum4/HTML/004172.html).

------------------
<ubuu> does hitler have a last name?
<jipe> .. yes, Ubuu, we're racist commy nazi jews, and we hate male pattern baldness
<Professor`K> Sorry, but half-way through your logic, my head exploded