Please or Register to create posts and topics.

Outputs cancelling out

I've run into a problem with my contest map, and that is that it is possible to get an output to cancel another out. A floor button turns on an excursion funnel, and a laser receptacle will invert it.

However, as someone discovered, it is possible to step off of the button and activate the laser, cancelling the "off" output and leaving the excursion funnel on even though nobody is on the button.

I'm turning the funnel on and off with Enable/Disable, and changing the direction with SetLinearForce. How can I go about ironing this out?

Instead of Enable/Disabling the funnel, try setting it's linearforce to 0. This disables it without, well, disabling it.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

This makes the problem even worse, because now you can turn on the funnel without the button at all. The problem is that the OnPressed output for the button is getting ignored since the laser receptacle is also sending an output. Thus, the Disable output never reaches the excursion funnel and it just stays on.

You need a logic so that the invert is only sent if the laser and the cube are sending outputs at the same time.

Being Welsh since 1992

I have kind of a similar situation in my contest map, try using logic_case to determine what the hell it should be really doing. There's no incredibly clean method of doing this that I am aware of. I have a timer that fires 0.1 seconds after either object is triggered to double check what state things are in.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

post35439.html?hilit=http://www.megaupload.com/?d=1L955XIG#p35439

I have provided an example which solves this problem in this thread.

Image
PortalStories.com
"Oh, in case you got covered in that repulsion gel, here's some advice the lab boys gave me: DO NOT get covered in the repulsion gel."

Your map didn't solve the problem, but that thread did. Thanks for pointing me toward it, though: the math_counter and logic_case solution worked fine. I haven't been able to reproduce the bug, so I'm just going to assume it's solved until proven otherwise.

There is a way using logic_auto's and use the CancelPending output leading to your other logic_auto.

There probably is a better way to do it from your description also.

EDIT: Just realised you solved it. Soz for continuiing xD

?????????????????????????????TWP Releases | My Workshop

You could also always have the button disable the laser catcher when it's unpressed and enable it when pressed. I'm not sure if it would bug out if you 1) pressed the button, 2) activated the laser, 3) unpressed the button, 4) removed the laser, and 5) repressed the button, but it's worth a shot and it's a fair bit simpler than a math_counter.

Image
Now with 100% more inline comments!

Math_counter and logic_case is the best way to go. It lets you control the output based on the on/off state of up to 4 different objects.