Output delay
then give the button onunpressed <relay> cancelpending.
Lpfreaky90 wrote:
Or just fire a logic_relay with a delay of the time you want the player to be on the button;
then give the button onunpressed cancelpending.
Wait, that's what cancelpending does? I had no idea you could do that!
So the Output Will not fired
Example
A floor_button opens a door with a delay of 10 sec's but on UnPressed it closes the door within 2 seconds. Now the problem is, that if you go on the button, and go within 5 seconds off the button, the door opens later, but you're not standing on the button. Now you can easily Make a relay, that has the outputs of the button, and make the Output from the floor_button: " OnUnpressed -> Door_Rl -> Cancelpending. " So now if you go of the button, the 10 seconds will be canceled 
FelixGriffin wrote:
Lpfreaky90 wrote:Or just fire a logic_relay with a delay of the time you want the player to be on the button;
then give the button onunpressed cancelpending.Wait, that's what cancelpending does? I had no idea you could do that!
Yep! It's also great for preventing errors that can be caused by quick moving on/off buttons;
Do_stuff_rl;
ontrigger, , 0.10
ontrigger, undo_stuff_rl, cancelpending, 0.00
undo_stuff_rl
ontrigger, , 0.10
ontrigger, do_stuff_rl, cancelpending, 0.00
Lpfreaky90 wrote:
Yep! It's also great for preventing errors that can be caused by quick moving on/off buttons;
It's important for laser relays/catchers as well, if not more important than on buttons.
Also, I remember learning the use of CancelPending by reading a conversation between wrathofmobius, Habzs and Aixce in the IRC Webchat who had a discussion by using outputs, like 'ent_fire Aixce Kill', then wrathofmobius would reply with 'ent_fire Habzs CancelPending' "i saved you aixce"
Good times. Wasn't there myself, but good times.