Trying to make my own dandy little elevator cog. Each surface is linkid'ed to the next frame the lift should move to. i.e., when the down6 button is pressed, doora0 and doorb0 close, it moves to frame 1, and then doora1 and doorb1 open.
Everything works fine until I get to frame 1. Then doora1 opens, doorb0 opens, and doorb1 remains closed. What am I doing wrong here?
Code:
# Jedi Knight Cog Script # # filename.cog # # Description # # # This Cog is Not supported by LucasArts Entertainment Co symbols message activated thing lift thing doora0 // 6th-floor door thing doorb0 // 6th-floor door thing doora1 // 5th-floor door thing doorb1 // 5th-floor door surface call6 linkid=0 // 6th-floor call button surface call5 linkid=1 // 5th-floor call button surface down6 linkid=1 // 6th-floor down button surface down5 linkid=2 // 5th-floor down button surface up5 linkid=0 // 5th-floor up button sound elev_stop=df_elev2-3.wav local int idgetr=0 local int previd=0 local end #======================================= code activated: idgetr=GetSenderID(); previd=idgetr-1; if (GetCurFrame(lift) == idgetr) { PlaySoundThing(elev_stop, lift, 1.0, -1, -1, 0x0); return; } else { Sleep(3.0); MoveToFrame(doora0[previd], 0, 2); MoveToFrame(doorb0[previd], 0, 2); WaitForStop(doora0[previd]); Sleep(1.75); MoveToFrame(lift, idgetr, 3); WaitForStop(lift); Sleep(1.75); MoveToFrame(doora0[idgetr], 1, 2); MoveToFrame(doorb0[idgetr], 1, 2); return; } # ........................................................................................ end
Everything works fine until I get to frame 1. Then doora1 opens, doorb0 opens, and doorb1 remains closed. What am I doing wrong here?
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