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"

How do I trigger an event after destroying multiple objects?

Hi, I'm trying to create an Escape puzzle where the player is trapped and a ceiling of spikes is slowly descending, I'm having trouble with one last thing before it's finished;

The player has to destroy 6 Fragile Spikes with a Laser which will then destroy the ceiling and reveal the escape route, my problem is how do I get the game to recognise whether all the spikes are destroyed or not, so once the last spike is destroyed, the event happens.

Product Version: UE 4.16
more ▼

asked Apr 15 '18 at 08:01 PM in Blueprint Scripting

avatar image

3 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

you have a few options here. you could have the spikes call a event just prior to them being destroyed, you could bind an event to the destruction of the spike (the bind would be in the level blueprint or in another actor), or you could use a timer to get all spike actors in the level at a regular interval then once you get all the actors check the length of the array it returns if its length is 0 or less then trigger another custom event.

personally i would go with the custom event but thats just because its easy to implement and because its more my style.

more ▼

answered Apr 15 '18 at 08:54 PM

avatar image

10.1k 33 10 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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