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"

How to loop component begin overlap blueprint

So what im trying to do is make an AI spawner, that has a set range, and when a player enters the range it spawns AI/mobs until the player leaves the range or kill the spawner.

Im pretty sure I have it setup correctly, but ever time I try a whileloop, I get a infinite error. I also tried with a gate, but my lack of UE knowledge is preventing me from using it correctly.

Here is the code im using.

https://imgur.com/a/khneUOk

Product Version: UE 4.21
Tags:
more ▼

asked Jan 30 '19 at 11:46 AM in Blueprint Scripting

avatar image

Fantasmagore
1 1 2 5

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

4 answers: sort voted first
more ▼

answered Jan 30 '19 at 12:47 PM

avatar image

Chyros
1k 6 3 6

avatar image Fantasmagore Jan 30 '19 at 01:29 PM

I read else where that aswell, but im a little lost on which type of timer function to use, ive read that link you posted and I was a little confused on how to implement it into what im trying to do.

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

For example alt text

more ▼

answered Jan 30 '19 at 12:14 PM

avatar image

tamogauk
23 1 3 2

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

Another way to do it (besides the one @Chyros mentioned) is to set a boolean in begin and end overlap for example named "isOverlapping". then use it in the tick function.

here is a good link : https://answers.unrealengine.com/questions/101748/is-there-is-overlapping-in-unreal.html

more ▼

answered Jan 30 '19 at 01:44 PM

avatar image

plangton
342 17 19 31

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

Just set it up like this and it will work how you want.

alt text

spawner.jpg (127.2 kB)
more ▼

answered Jan 30 '19 at 03:54 PM

avatar image

Nebula Games Inc
3.6k 20 9 14

avatar image Nebula Games Inc Jan 30 '19 at 03:57 PM

Spawn Time is a custom variable you create and set to how frequent you want an enemy to spawn. Spawner Handle is a custom variable that allows you to control the timer, being able to turn it off when the player exits the target area Spawn Enemies is a custom event you create that the timer drives based on the "spawn time" you set

(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