Download

Input on Begin Play

Hello all,
I created a bp door using a timeline, wich is trigered by the E keyboard touch.
I duplicated this bp in my scene so I have 3 bp doors: A, B and C.
By default, in the bp graph, the door is closed at the Begin Play.
What I’d would like to achieve is to set door A to be open at the begining. I’m not a programmer and I encounters some difficulties to do it.
Should I insert a node in the bp door, or recover a value from this bp inside the level bp?
The story is : at the begining, the door A is open, while the 2 others are quite closed, and if I click on the A door, I close it. If I click on the B and C door, I open them.

I hope to be clear, and sorry for my english…
Cheers,
Etienne.

Assuming you have a door that works like this:

77d115edb63f0c0d20a30741deb109f3df9a5769.jpeg

You could create a boolean variable whether the door is originally open or closed, and set this boolean variable to public.

b3b50827a672366efb236915db72e95b9faf9c62.jpeg

Then on your construction script you could do something like this:

4767604b7b8851c250bac1dab6ce89a470efc27b.jpeg

Then you would change your Event Graph to be something like this:

56464c2728e6693840aa4f181a0493fc4635292b.jpeg

And finally each time you drop one of these new doors to your scene, you can click on the boolean variable that you created and set it to door closed or door open. So any door you put on your scene you can make it be open or closed.

ae119eea5acfdb1f309e0d7f44ea85d4ca68615c.jpeg

Hope that helps.

Thank you Shogo,
I didn’t think about this. This would work well, but…
In my case, I need this to stream levels. I use the door like a portal : In a A level, the player click on the door (wich is closed). The new level B appear. When the level starts, the same door (same bp actor in 2 differents levels) still closed during few milliseconds, an then , it opens automatically.
I use the Custom Event node : in my bp_door, I set a custom event I call “ouverture porte” . Then, I recover this custom event in the level blueprint :

deedc181e4ca9dc731547649e1c1a1004b9d82a4.jpeg

Thanks Shogo for your time,
Bye