Please or Register to create posts and topics.

Problem with delayed events and cancelling them

Hi,

I have a Laser Relay that has a Output on 'Powered' to start animating an arm to the up position. It also has a Output on 'UnPowered' that then lowers it.

All works well, but if you add a delay to the 'Powered' Output of say 5 seconds, then if you move the laser away from the relay while its in this 5 second delay, then it immediately triggers the 'UnPowered', which is fine, but the 'Powered' event is still running, and then runs in a few seconds when the delay runs out. So the arm is in the up position even though the relay isnt powered.

Am I doing something wrong?

Or is there some Output that I cant find that 'cancels' all delayed events, so I can call that first on UnPowered, before animating the arm to down?

The reason I have a delay, is that I have lots of panels to move to up, and I put a .20 delay in each one so they look 'different'.

Thanks,

Rob.

My Portal2 Map: Trapped

My Travel Blog:
Image

Use the CancelPending command on the logic_relay that is to be halted

First guy tells the second guy, "My head hurts!" The second guy replied, "Stop thinking so much!" Then the first guy says, "I think that what caused my problem in the first place!" The second guy says, "Then stop banging you head against the wall!"

ImageImageVDC User Page

The output you want is "CancelPending."

It sounds like you're controlling everything from the laser relay directly. Use two logic_relays to control your up/down motions, one for up and one for down, with the up one triggered by OnPowered and the down one by OnUnpowered from the laser relay. Give each one the CancelPending output directed at the opposite relay (so the up one fires CancelPending at the down one), activated OnTrigger.

EDIT: Ninja'd ... drat.

There is no "N" in "Turret."
Will T. wrote:
EDIT: Ninja'd ... drat.

Oh well, At least you have brought in more insight.

First guy tells the second guy, "My head hurts!" The second guy replied, "Stop thinking so much!" Then the first guy says, "I think that what caused my problem in the first place!" The second guy says, "Then stop banging you head against the wall!"

ImageImageVDC User Page

Hi guys,

Thanks a ton for that... worked like a charm, just what I needed :)

I was doing all the work in the Laser Relay directly, now I have 2 Logic Relays and its fine.

Rob.

My Portal2 Map: Trapped

My Travel Blog:
Image