Trigger box and button input work on 2 objects

Hello, i started to learn UE4 and i wanted to make home that have 2 doors, after creating doors triger and script to it it work fine expect that no matter what colision box i’m inside both doors open, how to make UE trigger rotation on 1 door instead of 2 ? My blueprint looks same for first and second door expect for target mesh.

Hello totalover,

I do not see any collision/trigger boxes in your script. You are opening the door using E key. Instead of trying to figure out what’s wrong I will simply give you a basic example. There are many tutorials on this on youtube so it might be worth looking for one that best suits your needs. Anyway, try this for now:

  1. Create new blueprint of actor class. Give it a name and open.
  2. Go over to Viewport tab and add two static mesh components and a box collision.
  3. Set static meshes so you have a frame and door (see screenshot) and adjust box collision scale or box extent values a bit, you can work out the exact values that work for you later.
  4. Go to Event Graph tab, select your box collision component and add overlap events (see sceeenshot).
  5. Follow the simple script from the screenshot.
  6. Create new timeline float track with length of 1 and add two key frames. First is your start position, second one is your final position (see screenshots).
  7. Connect all the pins, compile and save.
  8. Place your door actor somewhere in the world.
  9. Now you have a working door.

This is just a very basic setup, there are many way (checks) you could do along the way but for the sake of simplicity and understanding the concept this should do just fine. If you have any questions, fire away.

281316-add-overlap-events.png

I’m kinda lost in the logic here, maybe you can supplement a picture of how it actually looks (sorry I’m a visual person).
From what I could understand, your house is a blueprint that has door components(meshes) added and you move the component itself? I keep wondering, why is the house a blueprint.
Is it possible to show “us” how that house blueprint looks like?

I created fully working doors with opening with my blueprint (its from youtube tho), it open and close but:
I got 2 doors:
Door1 + Colision1
Door2 + collision2

I create my blueprint for rotating Door1 and other one for rotating for Door2
When i’m in collision1 door1 and door2 open, when i go to collision2 door2 and door1 open/close too, they allways go same position (mirrored) instead of working like: IF collision1 rotate door1, if collision 2 rotate door2.

Maybe i shoud create doors blueprint first and then put it in my house blueprint ? So i got like: house blueprint containing: doors blueprint x2 and also like window opening blueprint x4 ?

Hold on, I think I know where the problem is. I can’t make it out in the video, but it seems you’re using the same key “E” for both events. Correct? If yes, then it works fine (opening both doors). You need to do additional check when overlapping the collision box. Engine doesn’t know this right now so it just fires of both door opening scripts.
Remove the enable/disable input and stand anywhere in the world then press E. If you door opens then it’s what I have said above.

If you like pop in to my discord and I will be able to help you out quicker in there:

Edit: As a quick fix you could go with something like that.

First one will check if actor overlapping the box collision is FirstPersonCharacter (ThirdPerson in your case), second one check if it’s a valid actor. Just like in the screenshots above.

I recorder video so you can see what’s happening and how my house looks like.