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 → Why won't this COG work?
Why won't this COG work?
2001-06-23, 3:02 PM #1
# Jedi Knight Cog Script
#
# turretai.cog
#
# When wirepanel is slashed, door1 moves
#
# The turrets became disabled.
#
#
# Edited by Lt_Greywolf
#
# [EM]
#
# (C) 2001 Wolfbrother Productions

symbols

message damaged
surface wirepanel mask=0xFFF
flex speed=1.5
thing door1
thing turret1
thing turret2
ai ai1=pednarsh.ai local
end

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

code
damaged:

SetWallCel(wirepanel, 1);
Print("This COG is jack crap!");
MoveToFrame(door1, 1, speed);
AiSetClass(turret1, ai1);
AiSetClass(turret2, ai1);
return;
end

==========

The print thing was to debug the COG...it never appeared.


------------------
A crooked man walked down a crooked road to a crooked house.
Yeah, I didn't believe in reincarnation in my last life, either.
the idiot is the person who follows the idiot and your not following me your insulting me your following the path of a idiot so that makes you the idiot - LC Tusken
2001-06-24, 6:30 AM #2
The code looks good, but its possible that having the line:

ai ai1=pednarsh.ai local

is causing some interferance with the compiler. Typically, you dont name something the same as the type

ie: thing thing1
or flex flex1

That and the way arrays work in JK might be confusing the compiler. Try renaming to something, like turai or turretai and see if it works then.
2001-06-24, 6:50 AM #3
Greven thats what I thought when I did it but its the only way I knew to set JK ai... But I was thinking:
Code:
# Jedi Knight Cog Script 
# 
# turretai.cog 
# 
# When wirepanel is slashed, door1 moves 
# 
# The turrets became disabled. 
# 
# 
# Edited by Lt_Greywolf
# 
# [EM] 
# 
# (C) 2001 Wolfbrother Productions 
symbols

message damaged 
surface wirepanel mask=0x408
flex speed=1.5 
thing door1 
thing turret1 
thing turret2 
ai ai1=pednarsh.ai local 
end 

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

code
damaged: 

SetWallCel(wirepanel, 0);
MoveToFrame(door1, 1, speed); 
AiSetClass(turret1, ai1); 
AiSetClass(turret2, ai1); 
return; 
end 

Wolfy im going to test it now...


------------------
The only way to live a good life is to act on your emotions.

↑ Up to the top!