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"

Spawn Ai from class

Hi guys, so im currently trying to create a spawner. The idea is simple, when the player collides with a trigger box the enemies start spawning. So this works but the problem is it only spawns one enemy. Ive tried various methods like using a while loop,for loop and even a timeline but it just doesnt seem to work. With the while and for loop it just spawns the enemy one time and with the timeline well it spawns the enemy a weird amount of times, i set up 9 nodes but it was spawning 5 times which is kinda weird.

alt text

This is the For loop example.

Here is the timeline example which spawns 5 enemies even though ive set up 9 nodes. Ive also tried changing the length but same happens. alt text alt text Any ideas why this isnt working would be appreciated. Thanks.

Product Version: UE 4.16
more ▼

asked Nov 21 '17 at 02:38 PM in Blueprint Scripting

avatar image

26 2 4 9

avatar image MasBASS Jun 27 '18 at 11:52 PM

Hello sir, try to use a Timer, TimerByEvent, it is better to control the spawning flow, if you haven't found the solution, please tell me so I can send you a picture ;)

avatar image ThompsonN13 Jun 28 '18 at 01:37 AM

personally i wouldnt try to use a timeline that just seems odd and i dont think it would work very well. have you gone through and debugs where the failure is? i mean go through node by node and insert a print string to ensure that they are all being fired. theres nothing at the spawn location that is blocking them, or the spawn isnt below the ground level. also make sure that the settings on things are such that they are set to always spawn no matter is they have collision or overlap issues. also of concern is the cast your using and the location to spawn as you never defined what those were.

i noticed about halfway through this answer how old this is so im guessing that this has already been solved.

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

0 answers: sort voted first
Be the first one to answer this question
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