• News

• Industries

• Learning & Support

• Community

• Marketplace

# Is there a way to set priority for Overlap?

In my level I have a puzzle which requires pushing blocks onto triggers in order to open a set of doors. One block remains on the Blue trigger which keeps the Blue doors open allowing the player to walk through. You then find a second block in the second area which the player pushes into a 2nd Blue trigger which opens the exact same Blue doors. The player then goes back into the previous room and pushes the first block onto a Red trigger that opens Red doors.

The problem I run into, is that as soon as I place the 2nd block onto the 2nd trigger the Overlap mechanic prioritizes the most recent actor which hits the trigger, basically meaning that if the block rolls off of the 2nd blue trigger, then the blue doors close [even though I still have the 1st block on the 1st Blue trigger]. Additionally, since the player is also an Overlap, then every time the player steps on either trigger then both of the blocks are null, until I push either block off the trigger then back on [making that block the current overlap priority].

The scenario which I am looking for means that if there is a block on either Blue trigger, then the doors will remain open. Only while their are NO actors on either Blue trigger will the doors close [Actors Used: The player, Block One, Block Two].

I am fairly new to Nodes and programming so I don’t know if I have the configuration incorrect, or if this is just a problem with the Overlap mechanic. Either way if anyone could help me with this problem, it would be very appreciated.

Current Style used:
-Doors are opened and closed using matinee combined with a trigger box.
-there are 3 triggers total, 2 are Blue, 1 is red
-The triggers open the doors with the same color [Blue trigger opens Blue door, Red trigger opens Red Door]
-there are 2 blocks for the puzzle [Blocks have 0 friction making them slide]
-At one point in the puzzle both blocks should be on a Blue trigger, keeping the doors open
-The first block is removed from a blue trigger and put onto a red trigger [the doors SHOULD still be open, since the second block is still on a Blue trigger]
-The player can also activate a Red or Blue trigger.

You can’t use begin and endoverlap for that.

What you need is fetching the number of overlapping actors in tick event. So every tick the trigger will check if at least one box is overlapping, if so open, if not close.

If you think tick event will be expensive, you can also set a timer that triggers every 0.1 seconds etc.

Use the gamemode to check the logic and open the door.

You only need check logic when an overlap happen.

Okay, will definitely have to give these a try. Am still learning the nodes, so I’ll do some research then get back to you guys if I figure it out.

It’s been a while since I have replied to this thread, but I unfortunately cannot for the life of me figure this out. I am not familiar with the nodes and have worked with multiple tutorials (mainly the door opening tutorials using tick events), following them step-by-step, and I still cannot figure out what I am suppose to do. Since this puzzle is integral to the progression of the level, it is hard for me to tell whether my design fully works.

If by any chance someone could screenshot a way to make this work, I can study the nodes you have used and keep note for future references (which is the main way I learn new programming styles). Many thanks to the person who can help me!