Create new object on hit.,

Hello. I created shooting target. Looking like this

On my level blueprint i have everything to create first target when game starts.

On my target blueprint i have this

263497-target-bp.jpg

to delete target when I hit it. Now I want to create new target when I delete current. How to do this? Sorry im really newbie, I will be grateful for the pictures. Thanks :wink:

,

I spoke badly i think, I would like to create game when you have 60 seconds to hit targets, and you can share with friends who have biggest score. Its just simple game for school. I dont want to place 9 targets, I want to create just 1 target and when player hit this target it`s deleting self and game create new random target in this 9 places and you shoot it again and again and you have just example 60 seconds for hitting most targets. Something like in this video but with static target(currently) : CS GO CLASSIC AIM TRAINING 25 targets - YouTube

So i dont have the same now? I have 9 targets, but like you said it will create 1 object each time, but what time I need to use some event and then when i hit target it will create new object on one of the 9 targets, but i dont now how to create new object when i delete this that is on map.

Hah na problem with that post. Thank you for trying to help me. I get the idea of what you doing now i think, but i have some error :confused:

You are the boss! Everything works perfectly like I would imaginate! Thank you very much man! :slight_smile:

can’t belive i posted the same you already have, must be the sleeplessness.

anyway…

What you need is to bind a custom event to your recently spawned “onDestroy” delegate.

  1. You drag of the SpawnActor ReturnValue and type “BindEventToOnDestroy”.

  2. Then you Create a custom event. mine is called “NewActor”. and you connect its red square to the BindEvent “Event” one.

  3. Now when the actor is destroyed, it will call your “NewActor” event.

It’s a Dynamic Multicast Delegate implemented on the AActor class in C++.
In blueprints it’s called “Event Dispatcher” and i highly recommend you learn more about them :slight_smile:

right click on the node and select “Refresh Node”, it that doesn’t work, drag from the red square and create the custom event there. it will automatically create the necessary pins for you.

yay!

you should transform your answer into a comment for my answer for order and future readability.

also mark the answer that did it as accepted so this shows as Resolved :slight_smile: