I have a door where when the player steps in, it allows you to press a key and enter. The issue is when enemies touch the collision while the player hasnt pressed the key, even though I have overlap only pawn and only wrote the code so that it only reacts if the actor is equal to player, the player is no longer able to open the door unless it leaves the collision and enters it again. I have also tried Ignore actors when moving, also doesn’t work. Can anyone give me any other suggestions please? Thanks in advance.
Hello ,
I would handle it like this, assign your player pawn a unique tag, like ‘Player’ and your enemies another one like ‘Enemy’
Then you can split what overlap does based on the tag of the overlapping actor like so:
Link for full res: http://i.imgur.com/cCVngRm.jpg
You could also tweak your Collision Preset settings on your door and enemies so that they can’t generate overlap events with eachother.
I have Overlap Only Pawn in my door :). Many thanks for the help anyway :D.
Did not know about that, thanks. The issue is, for example, I have a UMG appearing that says “Open Door” however, even with this code, when they step into the collision, that text disappears and I cannot open the door
No but it is set to visible inside its blueprint. The issue is not just the umg, its also the fact that I have to leave and reenter the collision to make it work again, which makes it disfunctional :/.
Ok, so you the UMG widget is added to viewport in your character BP?
Yea, the code above should fix that, could you screen cap your code and post it please?
Imgur: The magic of the Internet I hope it helps. Essentially is shows the tag and the code to activate depending on who is stepping on it or not. If you want to see the whole code, would Blueprint UE be ok for you? I did not put it there as I think this is where I am probably messing something up?
Yea, I can’t really see much there. What is Blueprint UE?
uusc5rp_ posted by anonymous | blueprintUE | PasteBin For Unreal Engine Basically you can paste your code into there :D. I posted the code up to the part where the UMG appears, the rest is puzzle combinations
Oh, neat website! I honestly don’t know. It seems to me that everything is in order. Anyone besides a pawn that has the RaphaelChar tag shouldn’t be effecting anything in that BP. If I think of anything else I will let you know.
The issue was that I had forgotten to add the Player only condition in my end overlap as well. Works fine now. Thanks all for the help.