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 → cogs do nothing
cogs do nothing
2002-10-16, 10:22 AM #1
there is a problem with my cog,

basicaly, it does nothing when it is ment to move the framesobjcts

here is the code:


# Jedi Knight Cog Script
#
# Filename.COG
#
# Description
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

thing trns_frame1
thing trns_frame2
thing trns_frame3
thing trns_frame4
thing trns_frame5
thing trns_frame6
thing trns_frame7
thing trns_frame8
thing trns_frame9

flex eject_speed
flex move_speed

surface move_out_switch linkid=1
surface move_in_switch linkid=2
surface eject_switch linkid=3

sound activate_sound

message activated



end

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

code

activated:

if ( GetSenderId() = 1 )
{
MoveToFrame(trns_frame1, 0, move_speed);
MoveToFrame(trns_frame2, 0, move_speed);
MoveToFrame(trns_frame3, 0, move_speed);
MoveToFrame(trns_frame4, 0, move_speed);
MoveToFrame(trns_frame5, 0, move_speed);
MoveToFrame(trns_frame6, 0, move_speed);
MoveToFrame(trns_frame7, 0, move_speed);
MoveToFrame(trns_frame8, 0, move_speed);
MoveToFrame(trns_frame9, 0, move_speed);
return;
}

if ( GetSenderId() = 2 )
{
MoveToFrame(trns_frame1, 1, move_speed);
MoveToFrame(trns_frame2, 1, move_speed);
MoveToFrame(trns_frame3, 1, move_speed);
MoveToFrame(trns_frame4, 1, move_speed);
MoveToFrame(trns_frame5, 1, move_speed);
MoveToFrame(trns_frame6, 1, move_speed);
MoveToFrame(trns_frame7, 1, move_speed);
MoveToFrame(trns_frame8, 1, move_speed);
MoveToFrame(trns_frame9, 1, move_speed);
return;
}

if ( GetSenderId() = 3 )
{
MoveToFrame(trns_frame1, 3, move_speed);
MoveToFrame(trns_frame2, 3, move_speed);
MoveToFrame(trns_frame3, 3, move_speed);
MoveToFrame(trns_frame4, 3, move_speed);
MoveToFrame(trns_frame5, 3, move_speed);
MoveToFrame(trns_frame6, 3, move_speed);
MoveToFrame(trns_frame7, 3, move_speed);
MoveToFrame(trns_frame8, 3, move_speed);
MoveToFrame(trns_frame9, 3, move_speed);
return;
}

# ........................................................................................

end

2002-10-16, 10:40 AM #2
if ( GetSenderId() = 1 ) etc. should be:

if ( GetSenderId() == 1 )

(Two equals signs)

Can't see any other problems, so that should do it.

2002-10-16, 12:14 PM #3
Do it like this. [http://forums.massassi.net/html/wink.gif] Gotta love arrays.
Code:
# Jedi Knight Cog Script
#
# [DP]
#

symbols

thing         trans
thing         trans1
thing         trans2
thing         trans3
thing         trans4
thing         trans5
thing         trans6
thing         trans7
thing         trans8

flex          movespeed

surface       moveout              linkid=1
surface       movein               linkid=2
surface       eject                linkid=3

int           i                    local

message       activated

end

#...................................................................
code

Activated:
   For(i=0; i<=8; i=i+1)
   MoveToFrame(trans, GetSenderID(), movespeed);
   Return;

end

Should have the same effect. Trust me. Any changes can be easily done. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited October 16, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack

↑ Up to the top!