I'm having a little trouble with this elevator of mine (yes, an elevator, very sorry). It's only a two level elevator, very simple. I have three triggers total for it: one inside the elevator that extends to cover both the top and bottom switches inside the elevator shaft (warehouse_elevator_trigger) and then two more triggers, one at the top outside the elevator and one at the bottom outside, both for calling the elevator (warehouse_elevator_trigger_top and warehouse_elevator_trigger_bottom respectively). When the elevator is moved to the bottom (warepos 0) whether by the trigger inside or if it is called there by the bottom switch, I don't have a problem. The elevator stops, the doors open and stay open, and it waits for another trigger. But if it gets moved to the top (warepos 1) it reaches the top, opens the doors up there, and quickly closes them and moves back down to the bottom as if I had initiated the warehouse_elevator_movedown method immediatly after reaching the top. Here's my code, I just can't figure out what's wrong:
hehe, we need some of the other people on, im not that smart (i also havent read through it yet, im kinda tired) tomorrow if u dont have an answer ill look at it and see if i notcie anyhting.
This way the trigger cant start multiple paralell movement threads, and is only triggerable again once the elevator has completed its movement.
Your strange behaviour is probably because you have no idea what so ever what your script is actually doing. So remove the goto's and replace them with thread or waitthread.
I also suggest using a 3:rd elevator state (level.warepos = -1) to signal to the elevator system that the elevator is busy moving.
thanks for the help guys, i've tried all the things you mentioned, unfortunatly I can't see if they work because my map simply will not load my script for some reason. The script is simply not loaded every time I start the map, so I have to figure that out first I guess.
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.
BirdsofaFeather wrote:I'm having a little trouble with this elevator of mine (yes, an elevator, very sorry). It's only a two level elevator, very simple. I have three triggers total for it: one inside the elevator that extends to cover both the top and bottom switches inside the elevator shaft (warehouse_elevator_trigger) and then two more triggers, one at the top outside the elevator and one at the bottom outside, both for calling the elevator (warehouse_elevator_trigger_top and warehouse_elevator_trigger_bottom respectively). When the elevator is moved to the bottom (warepos 0) whether by the trigger inside or if it is called there by the bottom switch, I don't have a problem. The elevator stops, the doors open and stay open, and it waits for another trigger. But if it gets moved to the top (warepos 1) it reaches the top, opens the doors up there, and quickly closes them and moves back down to the bottom as if I had initiated the warehouse_elevator_movedown method immediatly after reaching the top. Here's my code, I just can't figure out what's wrong:
Thanks in advance to anyone who can figure out this demon in my code.
lol, you have initiated it to come back down straight after it has gone up, you need an end where demonstrated, if your still having problems with your script have a look in the console, it'll tell you where your going wrong
post the whole of your script if that doesn't help
hope this helps, prob not cos it's all foreign 2 me :-/
lol, you have initiated it to come back down straight after it has gone up, you need an end where demonstrated, if your still having problems with your script have a look in the console, it'll tell you where your going wrong
OMG!! I can't believe that's what's been bugging me for this long! That was it, unbelievable! I checked that code at least 20 times, and I never even noticed that was missing. Thanks man, maybe you can figure out my rocket problem too (I'll post that in a new topic).
Look! Up in the sky! It's a Bird! It's a Plane! It's......oh wait it's a bird.