x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Create new object on hit.,

Hello. I created shooting target. Looking like this alt text On my level blueprint i have everything to create first target when game starts. alt text

On my target blueprint i have this alt text

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 ;)

,

Product Version: Not Selected
Tags:
level-bp.jpg (150.9 kB)
target-bp.jpg (45.3 kB)
hittingtarget.jpg (84.2 kB)
more ▼

asked Dec 28 '18 at 07:40 PM in Blueprint Scripting

avatar image

qyzdo
3 1 1

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

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

alt text

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 :)

1.png (73.0 kB)
more ▼

answered Dec 29 '18 at 03:50 PM

avatar image

Evigmae
1.6k 7 3 8

(comments are locked)
10|2000 characters needed characters left

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. It`s just simple game for school. I don`t 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) : https://www.youtube.com/watch?v=JoXwUM4lyWU

more ▼

answered Dec 28 '18 at 07:59 PM

avatar image

qyzdo
3 1 1

(comments are locked)
10|2000 characters needed characters left

So i don`t 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 don`t now how to create new object when i delete this that is on map.

more ▼

answered Dec 29 '18 at 03:12 PM

avatar image

qyzdo
3 1 1

avatar image Evigmae Dec 29 '18 at 03:47 PM

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

anyway...

(comments are locked)
10|2000 characters needed characters left

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 :/

alt text

error.jpg (146.9 kB)
more ▼

answered Dec 29 '18 at 04:01 PM

avatar image

qyzdo
3 1 1

avatar image Evigmae Dec 29 '18 at 04:04 PM

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.

avatar image qyzdo Dec 29 '18 at 04:06 PM

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

avatar image Evigmae Dec 29 '18 at 04:17 PM

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 :)

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question