Hello all I need help with my game…
So here is my dilemma, I have one specific key to handle all of the intractable objects in the world IE an elevator and door. But every time I press e both the elevator and door are activated. Is there a way to have a system where: if the player is inside the box trigger for the door then only the door will activate.
Image of my blueprint:
And thank you in advance for your time and effort it is greatly appreciated
you could have a check that ensures the player is within a certain range or is within a collision volume. you could also have the input priority changed to higher priority on begin overlap. I would go with the former for now and have a trigger box that when you enter it (begin overlap) it changes a variable to true. then have a branch that comes right after the input that checks the bool before completing the action. Its a very basic way to make it work
Hello again I had a question im a noob at UE4 and I was wondering about the code that you used in the Boolean for INRANGE?
The inrange nodes are just a variable of the type bool. To create a variable go into your blueprint and look for the “my Blueprint” section which is on the left by default. in this section look for where it says variables and click the + sign. once you have a variable you can drag it onto the event graph and it will have a popup asking if you want to get or set the variable.
Here is what I have so far i cant compile it for some reason.
Btw thank you for all of your help
you need to take the other actor pin(third one down) from the overlap node and plug that into the cast node that should fix the compile error. Currently you have the overlapped component connected to the cast which would cause it to always fail
whoops sorry about that. But now the door doesn’t open the elevator still goes down. I have a box collision within the airlock blueprint or is it supposed to be separate.
Or I think that I just need a reference to the matinee actor that plays the animation to open the door.
If so how do I do that i am trying right now but I cant seem to get a reference to it
your looking to open the door when you press the E key right? did you swap the print string node with the logic that actually moves the door? the way the Logic is set in your picture above it just prints text on the screen, that was done just to show how it worked. to get the door to actually move you will need to swap that node with other functionality.
For some reason I cant get a reference to the Matinee actor (Matinee actor 2)
How do I play the Matinee?
I dont really use matinee or sequencer so i cant help you with that method, but a simple way to do it in real time would be to use a set location, a timeline, and a lerp vector. With this method the timeline allows you to change a value over time which in the example i made drive the alpha of the lerp node which transitions the output vector from the A pin to the B pin.
The inset picture on the bottom left shows the timeline that i used.