Referencing/Selecting all triggers

Is there a quick way of referencing all triggers within a level?

I’d like to move all the triggers in my level to a certain height on keypress, but I can’t seem to find a way to do this?

I’m not sure if triggers can gave tags, but if they can, you can add a tag to each and then use a Get all Actors with Tag node.

Another thing: there’s something happening in your level since you want to move your triggers. Maybe you can link triggers to something else as children?

You could create a trigger bp (essentially just a collision primitive being its root). On begin play you could then “find all actors of class” and save it. This way it is automatic, so if you add more triggers later you dont have to do anything (dont forget to clear the array first or it may pile up.

You could also do that manually in the level bp

I’ve got hundreds of standard triggers in my game and am trying to find a way to reference them all at key press

I’m not sure I understand, the problem is I’ve got nearly 200 standard triggers and need them all to move down a few metres at a certain point in the game

Well that is not a problem at all. Find all actors of class, will find all 200 of them.

You could replace all 200 with a BP actor if you right click “replace” . Make sure you select the BP actor in the content browser.

I’ve checked, trigger volumes do have tags like other actors. So you can add a tag, say, “Trigger” to each of them

260278-trigger.png


And then when you need to access them all, you use Get All Actors with Tag node

260280-trigger.png


and feed it to Foreach node and do whatever you need to do with them.

The second thing that I mentioned: do your triggers just hang in the air by themselves? Or are they attached to something? Because I’m pretty sure there’s an easier way to do what you want to do, but I don’t have enough information to analyze.

They’re pretty much just in the game space but depend on other triggers to function like trigger A controls trigger B

Awesome, not sure if 4.15 has that functionality but if it does that’s great, job done!

Massively appreciate all your kind help guys, thanks!

No this is the thing because I need successive triggers to function

Actually, since all triggers that you placed in the scene derive from an engine class, you do not even have to create a blueprint. Just find the right class. See the screenshot.

260295-screen2018-11-23-20-27-54.png

Depending on what you want, you don’t have to raise them. You can just turn collision off

It definetely does! Just try out and place a breakpoint after the node to check the array, you will find all triggers in there.

Thanks again!