Get distance between player and specific trigger

if you have 130 triggers i would create a more dynamic solution using arrays and such. as for what you posted in the picture it would never work because you are comparing your player location to nothing. you need to have an object to compare to for the get distance to node.

how do you want the system to work? are the triggers going to pop up at random? do they only switch when the player hits them? i would sort out how it all works and get your system better optimized prior to implementing the distance to aspect.

below is an example of how you could implement the whole system in the level bp. the script below handles the raising and lowering for all of the trigger boxes. i set it up so the box selected is random (so its a bit like whack a mole). this way of doing things eliminates the need to write the same script for every trigger in the level. the timelines are just a 0-1 value over 1 second. in the second picture you will notice there is show how you would do the get distance to. anyway the idea is that you have a variable that is the currently raised trigger and use that variable as the thing to compare to in the distance calculation. hopefully this example helps by showing you how it could be done.

the only thing left to script is the calling of the switch trigger event which is based on your gameplay.

250209-capture3.png