Hi again
I created a door what is moveable by pressing a button. It works really good, i have ony small problem. If i press the button, the door start opening. While the door is opening and then i press the button, the button is moving, but the door don’t start to close. Did you understand me? Not? Here are the files:
www.et-section.atw.hu/maps.zip
Door scripting problem
So, you want a button which opens the door if you press it, and close it if you press it again without waiting for the door to open completely?
I would try to put a “halt” statement before the “resetscript” statements in both of your door script blocks.
I can’t check right now if that is the problem, maybe someone else will in the mean time.
but do you want a door that can be interrupted while its moving or you want the lever not to move while the doors are closing/opening?
but first, why are you using globalaccums?
I want the first (door that can be interrupted while its moving). I dunno waht is the real difference between globalaccums and accums
yeah then use “halt”
the difference is that globalaccums can be used throughout the script.
accums are used only in their scriptname.
Correct.
Now you might think what the difference is, but consider this:
-you used up 8 globalaccums because you have 2 buttons, 4 door-parts and 2 parts to make a drawbridge.
-you want to add a tank but you haven’t got any place to store the position/status
-now you 'd need to go back and rethink the whole script.
Moral: try to stick to accums when you don’t need those values anywhere outside that entities script block, which is the case here.
Figured it out, just needed to put a wait thend gotomarker like here
gotomraker xy 32 [b]wait[/b]
