Plenty of ways to do this, for a minimal change to your current logic it’s probably easiest to add a GetActorOfClass
(with Third_Person_Nasreddin
as the parameter) node after the top cast and connect the output to the bottom logic.
To simplify the graph (while still being a very small change), if the coin only responds to player/horse collisions, you can remove the sequence and casts because the GetActorOfClass
I mentioned above can always get the player.
Warning: All this assumes there is only one Third_Person_Nasreddin
actor in the scene, because if there are multiple GetActorOfClass
will return an (effectively) random one of them.
Thank you for your leply. Sorry Im very new at UE I did this now horse collecting coin count but player just collect one coin then stops. If it is possible can you share a screen shot to how to do it
Can you screenshot your current blueprint logic (assuming you’ve changed it and it didn’t work)?
Your logic is now half-connected to your top branch, and half-connected to your bottom branch (so ofc it breaks).
Give me a few minutes, I’ll open my UE and make an example.
Okay Thank you so much
This should be all you need for now:
Assuming it works, I’d still recommend you look at what you had before and figure out for yourself why it didn’t work. You’ll need to upgrade/replace this in the future as you add more complex logic, and you’ll need to understand what it does to do so.
Thank you so much it workedd many thanks for your help