Destorying a spawned actor and spawning a new actor

Hi all,

Just having some slight confusion here over spawning/destroying an actor.

I currently have a blueprint script where when I walk into a trigger box, an actor is spawned (a fireball) in a specific location. What I want to be able to do now though is to destroy the actor that I spawned and spawn a new one in that specific location.

I have a constructions script, checking if there is a fireball already in the level, and then an event graph that spawns the fireball.

Thank you!

Hey there, as far as i understand when you walk into a trigger you spawn a fireball in a specific location, if you walk out and in again you want to destroy that fireball and you spawn a new one on the same specific location? If that’s the case then what you can do is store the reference to the fireball after you spawn it in a variable, next time you trigger you check if that variable is valid, if it is you destroy it and spawn a new one.

Yes, that is correct.

I’ll try your suggestion and see how that works. Thank you!

Let me know how it goes :slight_smile: