Stop a prop_dynamic performing a delayed animation? [Solved]
I've almost completed my first map. But I have one small issue, that although is not a puzzle breaker, is very annoying. So hoping some of you experienced mappers can help.
The issue is that I have a floor button. When its pressed it tells a prop_dynamic (telescope arm in this case) to move up 90degrees. When the button is unpressed it tell it to move back down after a delay of 8 seconds. (Using animations ofc)
While standing on the button I want it to stay up, but if I get off and back on again, after a few seconds the delayed on unpressed command kicks in and moves it down.
So is there a way to cancel an instruction that is attached to a delay after it has been triggered?
Instead, move all of the current OnPressed commands into a logic_relay, and all OnUnpressed commands into another logic_relay. Add the button outputs like this:
OnPressed -> logic_relay-1 -> Trigger
OnPressed -> logic_relay-2 -> CancelPending
OnUnpressed -> logic_relay-2 -> Trigger
OnUnpressed -> logic_relay-1 -> CancelPending
EDIT: I haven't actually tried telling a button to CancelPending OnUnpressed. That may work, but I'm not sure. I know doing it OnPressed will crash Portal 2.
Thanks for help. One of those occasions where searching for something told me everything except what I needed to know.