pablogener Posted April 6, 2013 I have this lift that should work 'automatically' when the player gets on it, but not before something else is done. I want my player to try to get on the lift, nothing would happen, he would then have to go up to a computer terminal and press 'use' on it, go back to the lift, then the lift would work ok. how can I get it done? thanks for your time!! 0 Share this post Link to post
Krispy Posted April 6, 2013 This is how I would do it. Dunno if it works of not though. script 1 (void)//for the lift { if(ActivatorTID == 1) { Plat_UpWaitDownStay (tag, speed, delay); } else { print(s:"No power!"); } } script 2 (void)//for the control panel { Thing_ChangeTID (0,1); } 0 Share this post Link to post
gggmork Posted April 6, 2013 make global variable (outside scripts) called liftActivated = 0; or whatever. Computer switch sets it to 1. Walking on the lift does: if liftactivated == 1: bla 0 Share this post Link to post
pablogener Posted April 6, 2013 I did it gggmork's way, figure it out myself later. krispy's way seems better, though. It's actually working fine right now, so I wouldn't change it (don't fix it if it's not broken, right?), anyway, I didn't take into account that the player itself could be a carrier of a 'flag-acting' variable, with that TID value. it's a much useful resource, thanks for the tip. 0 Share this post Link to post
pablogener Posted April 6, 2013 just in case you guys wanted to checkout the code I produced, here it is: script 11 (void) //for the lift { if (pReroutePower == 0) { light_flicker(35,255,80); print(s:"Lift offline. Reroute backup power to operate"); } else { floor_raisebyvalue(35,4,255); delay(140); exit_normal(0); } } script 12 (void) //for the panel { pReroutePower = 1; light_fade(36,255,70); print(s:"Backup power on. Service lift operation restored"); } 0 Share this post Link to post
gggmork Posted April 6, 2013 Now I bet you can run in and out of the lift really quick to make it go up without you and get stuck. 0 Share this post Link to post
pablogener Posted April 6, 2013 ya, just like with many id-original maps... and if you did that you'd be an ass. 0 Share this post Link to post
gggmork Posted April 6, 2013 I see the lift is supposed to exit anyway, but you can prevent that by making another global variable: int liftPosition = "down"; then put another if/else, nested inside of your else above. if liftPosition=="down": lift goes up, liftPosition="up" else: lift goes down, liftPosition="down" So you can keep pressing the lift up/down. 0 Share this post Link to post