Download

overlap Triggerbox A and press a Key - it changes Object A and B without overlapping Trigger Box B

hello guys, i am completely new to this but i allready love it. For someone who has no clue to the logic of some commands (Because some commands just dont give any idea with its context.) its hard for me to find the reason or the solution to this.

I viewed a tutorial for a sliding door and I wanted more than a sliding door so I just expanded it with some ideas and googelt me to the solutions of my ideas. Hours of trying, lol. So now I have a sliding door which slides after beeing near a triggerbox-button AND press+release E. The button lightly moves (pressing visualized, as long as E is pressed) and changes the color (material in this case) from an red material to and green (after E is released) and after pressing it again the door closes and the button gets from green to red. It makes sounds when press E + door opens + door closes.

So now to my first problem. I want a door which can be opened by a button from inside and outside I just copied the objects and commands and renamed it (ButtonIn, ButtonOut,…) and changed the locations in the commands for the second button and so on… Now **when i go to Button A **(and only overlap Trigger Box A) BOTH buttons react to KEY E pressed and released.(changes material, playing sound 2 times and location) Why? I see no logic here because I just overlap Triggerbox A - so button B should not react.

Thanks for your help

Richard

I have every command and picture in the PDF in the annex. Dont know how to fit it here and my screenshots where to big (above the allowed 700kb)

If you’re using a node like:

Screenshot_1.jpg](filedata/fetch?id=1849710&d=1609934352)

it will trigger from anywhere on the map.

You could make this work by having the button check which overlap the player was near and respond accordingly, but it may be easier with blueprint interfaces because they are actually designed for this:
https://youtube.com/watch?v=G_hLUkm7v44
EDIT: Yes, just checked your code. For each E event, add a check to see if the player is overlapping the box ( IsOverlapping ), otherwise don’t run the event.

Screenshot_2.jpg

Thank you for your answer and help.

I tried it out and Pressing E anywhere on the map does not effect the door or anything else. It really triggers only by standing in the trigger box.?

I tried it out and added the “is overlapping actor” as you can see in the screenshots. I added it in both overlapp-events for BoxIn and BoxOut.

Again, both buttons react by standing only in triggerbox A. Why?

Further I dont see the sense of the “is overlapping actor” because shouldn’t the “BEGINOverlapEvent” allready have the same meaning?

fde2de3e1b63504ad1337dd1af111bf5f1d76a47.png

fe53bf05de882ccbeb08512cfe5b0829dcffb331.png

It only triggers locally because you bothered to turn the input off with the overlap events.

I’ll write you something… ( little while )

Ok, so I made a door like this:

](filedata/fetch?id=1849860&d=1609956461)

The code is:

](filedata/fetch?id=1849861&d=1609956490)

And the routine for changing the material is:

](filedata/fetch?id=1849862&d=1609956529)

( I didn’t actually bother animating the door ).

Another very standard way of doing this is with blueprint interfaces, but that takes a bit more of a setup.

Thank you, the routine way is something i have to look closer and try it with a complete new blueprint to understand it. Thank you for this new variant.

In my case it helped a lot because i saw that you used “is overlapping actor” as a condition with a branch. I expended it with a multigate and it succeed for my complete blueprint and I also understood, that “Beginoverlap” just activates every command that follows but only the “is overlapping actor” with the right target specified the inner or outter button.

This is the way i learn, trying hours, googeln, asking. Thanks.

Here my finish blueprint


Glad to help :slight_smile: