my MOHAA nor my MOHAABT work on this computer and the computer that it does work on i have to travel to get to (can only get to on weekends) so i need to ask this here instead of test it myself... please help?
I have an elevator with a trigger on the elvator and a trigger on one of the floors. I want both triggers to be able to activate the thread. any help without having 2 seperate threads would be much helpful!
Make 2 triggers, Connect 1 trigger to a switch that is connected to a elevator.
Now connect the second trigger to a switch on a one of the floors.
One trigger have a set thread to move up or whatever u want it to do, And have the second trigger set thread to go down ect...
When i say connect, I mean target.
Sound kinda what your looking for?
I would use setthread to start the thread that runs the elevator and forget about waittill trigger . As soon as the thread runs you turn off the trigger until the elevator gets to where it is going .
Beret:
The only problem with that one is i want to be able to have it so the elevator can be called from the bottom floor when it is at the top, if im reading correctly, your suggestion wouldnt let me do that.
I could but thats not the problem, the problem is having more than one trigger activate the thread. I may have found my answer though, ill get back to you guys on this little issue.
Use level variables to keep track of what floor the elevator is on . By useing the setthread key on several triggers and haveing the setthread keys point to the same thread you can have as many triggers as you want running the same thread . Just remember that every time a trigger starts a new thread an old thread could be running . That is why you need to use level variables not only to keep track of what floor the elevator is on but also possibley do other things as well . What you maybe should do is name all the triggers the same , with the same targetname that way doing something like this
$mytrigger nottriggerable
will turn off all the triggers with that targetname at once then when the elevator gets to where it is going
$mytrigger triggerable
will turn them all back on again . The triggers can be given different keys like one trigger can have the key floor and value 1 and another trigger can have the key floor and value 2 . In the thread started by setthread self is the trigger that started the thread . You can use that in the thread too like self.floor for example to see what the floor key on that trigger is set to .