Differentiating Trigger Volumes to Enable Different Actions

I’ve finished the lessons on Section 3, Building Escape. I’d like to polish the game a bit to make it a bit more complicated.

I’ve added a second trigger volume (named CouchTriggerVolume) and attached it to different doors. It functions in the same way as the trigger volume on the “win the game” exit door. If the total mass within the new volume exceeds the threshold, the doors open.

Instead of using the same mass threshold, I would like CouchTriggerVolume to use a different threshold. What’s stumping me is how to get the name of the trigger volume an actor is within. GetName doesn’t seem to work with a trigger volume.

Maybe that’s not the best approach any way. Does anyone have ideas on how to apply different mass thresholds to different trigger volumes?

1 Like

I did something similar and didn’t change the code at all.

I added two more TriggerVolumes, which I colored differently (with doors to match their spotlight colors). I didn’t edit their names and they ended up as TriggerVolume2 and TriggerVolume3. When selecting the new doors which were going to be triggered, then in the Details pane, selecting the OpenDoor Component (Inherited), I was able to select the new PressurePlate from a dropdown menu which listed all the available TriggerVolumes.

Hopefully that makes sense and helps with what you’re trying to do.

image

Thanks for the response Arbel.

What you describe is what I currently have: two separate trigger volumes that trigger different doors when the mass of overlapping actors exceeds a single trigger mass. As you outlined, I created a separate trigger volume then associated it with different doors by changing the associated trigger mass in the Open Door component of those doors.

As it is, once the player figures out one trigger mass, the game is solved by moving the same items to the trigger volume associated with the “winning” door.

What I’m trying to do now is have each trigger volume have different trigger masses so that the player has to explore the game more fully to solve the puzzle. Currently, the only trigger mass in the game is 30kg and it applies to both trigger volumes. That mass can be reached by placing two chairs within either of the trigger volumes. I’d like the final exit door to have a higher trigger mass so that the player must go to another part of the game map and retrieve additional items to win the game.

You should be able to set each trigger volume’s mass in the UE editor. It’s right below where you specify which pressure plate is linked to the door. I’m sure you thought of that, so is it not working correctly?

Doh! I only noticed the ability to change the trigger volume.

I have a similar problem. For me, the first trigger door opens the first door as it should when the correct props are put on the pressure plate, BUT it also opens the second door. Additionally, when I place the correct prop to open the second door on the second pressure plate, the angle of the second door increases by an additional 90 degrees, but the first door remains open at the correct angle.

Any suggestions?

Privacy & Terms