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 → MoveToFrame()
MoveToFrame()
2001-01-20, 8:03 AM #1
Hello.
I am making an MP level which has 2 stations and a train thet moves between them, with doors that open and close. It all works fine, except that when the doors and train get to station2, door1 opens and closes, then door2 opens and closes (They need to do this at the same time) Then door2 moves off immeditaely and door1 and the train (moving together) follow it.
please help. The frames are all okay, i triple checked.
Code:
# Jedi Knight Cog Script
#
# trainmove.COG
# moves the train from  station1 to station2 then back  again.
# Chimera
# 
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols
message      startup                                                          
message      pulse                                                            
flex         speed                                                            
thing        train                                                            

thing        door1                                                            
thing        door2                                                            
end                                                                           

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

code
startup:
setpulse(74.0);
sleep(10.0);
//close doors
movetoframe(door1, 1, speed);
movetoframe(door2, 1, speed);
sleep(2.0);

//move the train
movetoframe(train, 1, speed);
movetoframe(door1, 2, speed);
movetoframe(door2, 2, speed);
sleep(20.0);

//open doors again
movetoframe(door1, 3, speed);
movetoframe(door2, 3, speed);
sleep(2.0);
//back to station 1.
//close doors
movetoframe(door1, 2, speed);
movetoframe(door2, 2, speed);
sleep(2.0);

//move the train
movetoframe(train, 0, speed);
movetoframe(door1, 1, speed);
movetoframe(door2, 1, speed);
sleep(20.0);

//open doors again
movetoframe(door1, 0, speed);
movetoframe(door2, 0, speed);
sleep(10.0);

pulse:
//close doors
movetoframe(door1, 1, speed);
movetoframe(door2, 1, speed);
sleep(2.0);

//move the train
movetoframe(train, 1, speed);
movetoframe(door1, 2, speed);
movetoframe(door2, 2, speed);
sleep(20.0);

//open doors again
movetoframe(door1, 3, speed);
movetoframe(door2, 3, speed);
sleep(10.0);
//back to station 1.
//close doors
movetoframe(door1, 2, speed);
movetoframe(door2, 2, speed);
sleep(2.0);

//move the train
movetoframe(train, 0, speed);
movetoframe(door1, 1, speed);
movetoframe(door2, 1, speed);
sleep(20.0);

//open doors again
movetoframe(door1, 0, speed);
movetoframe(door2, 0, speed);
sleep(10.0);

end

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

end

2001-01-20, 10:11 PM #2
please help.
2001-01-22, 6:20 AM #3
Pleeeeeassaaaaaaaaeeessssssseeeeeeeee

↑ Up to the top!