Please or Register to create posts and topics.

trigger initiating different relays based on filters?

I am modifying a scanner i have in my puzzle,
I want to have the scanner do different things depending on what object is in the scanner.

I have already figured out how to filter objects, based on their model, though i havent figured out on if it is possible to let one trigger actuate different relays depending on what filter matches the object triggering the trigger.

I think i could duplicate different triggers in the same location that have all a different filter,
though this will get very messy and hard to work with.

So... is it possible to let one triggerbrush put out different triggers depending on what filter they match?

here is a screenshot of the scanner i was talking about...
Image
Take a guess what happens when the "wrong" object is scanned ;)

Portal 2 Marriage Proposal project: Linking Annex
Spotlighted and over 9000 downloads!!! SP_Angrybombs


Here's my youtube & deviantart

I haven't tried it, but I would assume you could have a single trigger with several different filters attached to it, and each filter could have a different output.

By the way, I like your idea. It sounds like a fun map.

Winner of the Nobel Prize for Being Immune to Neurotoxin

Thanks for over 1,000 downloads: The Cold Shoulder

I tried for ages to get this working today, like you said you can easily get it worked with cloned triggers and filter on top of each other but it is very messy.

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."

You could try something like the following (this is an extension of Marise's post):

Setup a single trigger, your filters, equal number of logic_branches as you have filters, and the objects.
Once an object enters the trigger, send an output to each filter testing the activator.
Each filter will then set the value of their corresponding logic_branch to True if the object passes.
Once a branch is set to true, you can send it the "test" input (or for less clutter, use SetValueTest to pass the value and test it in one go) and have it execute whatever you want.

Having multiple triggers, one for each object/filter, is the only real solution. If there was any way to get the classname of the activator you could use a logic_case, but there's no way to do that that I can think of.

[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.