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.
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