I think that’s probably a simple question, but still I can’t get the solution right now …
I have an Actor Blueprint and I spawn it into the world.
This is a flashlight that can be picked up by the character. Everything works well so far.
But as soon as I put the same blueprint into the world twice and want to take the 2nd, the first disappears …
I’ve had the same thing before, but unfortunately I don’t know what the solution was … I know, i’m still at the very beginning of learning blueprints.
The interact script should be in the player, not in the flashlight. Input should be handled by the player, not by the flashlight. The whole idea is that the player looks / clicks / points at something and interacts with it.
This is a flashlight that can be picked up by the character
How do you intend on doing this? Click? Be close enough and press E to collect? UI element pops up and we scoop da loot?
I am currently doing this with a LineTraceOfChannel with a distance of 300 to the object.
When the LineTraceOfChannel event reaches the flashlight, I set a Boolean value that says that the flashlight is in focus. I then call up this Boolean value in the flashlight.
The CustomEvent “Client Scanning for Items” is a preparation for a possible switch to multiplayer
See screenshots.
Can you give me an example of how I roughly set up the whole thing in the Player Blueprint.