I’m working on a prototype “Survivors” style game but I’m having some issues with spawning an item when an enemy is killed and having that item be picked up. Currently each time an enemy dies, a yellow ball is spawned, when the player enters a radius, the ball flys towards the player and gets destroyed, this works great but I keep getting this error and I can’t figure out how to fix it.
Click this to find the culprit:
Report back, the issue is not in the shown screenshots. Also, for sake of correctness:
Spawn first, destroy self later.
And the timeline is interpolating twice, you’re sampling location during an update - it will work, but will be inconsistent. For best results, store the values and have the TL play with those during its update:
So i’ve edited the XPDrop blueprints like you mentioned, I’m no longer getting the error however it’s no longer flying towards the player, it just teleports to them, waits a second then destroys the actor.
Does this fail? Does it even trigger?
Thinking about it, if the player keeps moving, this will not work well, indeed. I guess, in this instance, you may need to resample the TL. Or use Tick.
The thing is that TL is a bit of an odd choice here. Hear me out. The TL lasts X seconds, no matter the distance. An XP that drops 10 meters away will take the same amount of time to get to you as the one that drops 1 m away. Does it matter / is important?
Hmm good point, it’s not a huge issue because they should only fly over to the player when they are in range of it, so it should be a set distance each time