Actor is spawning in the same place

Hello! I am trying to make an actor spawn at different locations but it keeps spawning at the same one (5).Can you help me?

Thank you!

https://prnt.sc/unovgf

I placed 18 target points and did that https://prnt.sc/unovgf

Using Event Tick isn’t a good idea as this fires every frame. Try using Event begin play and just have your code looping every couple seconds (or however you want it too). I would also add a check for last spawn transform, to avoid spawning two actors in a row in the same spot. You could also limit the number of actors (or not) with a simple integer counter.

This example uses simple Custom Event that keeps looping on it’s self every 3 seconds (after spawn). If new random transform is the same as last one, find a new one.

You could also use a Set Time by Function name but it’s essentially the same thing.

yes , that worked but only if i stop the actor bp.(https://prnt.sc/unrbv2) Do you know another way to make the actor moving to a certain direction ?

Hi. If you want actors to spawn in different locations you have to tell the game what that location is. Can you show how you spawn it now?

Not sure I understand. What does on have to do with the other? You spawned actor can have event tick to move. But from this it just keeps moving forever, never being destroyed?

It will destroy when the player shoots it or when overlap with player.Idk why but without this code it workd very well

Thanks, that solved all of it.

You can always use vector lerp node with a timeline to move actor from one play to another over time.