Hi guys. I'm in need of some help. I'm still very new to mapping and I'm by no means an expert, bear with me!
I'm trying to make a unit spawner, solely through the use of triggers. I want said spawner to spawn units who will patrol the nearby area but not wander off too far away from the spawner itself. I feel like I've been close at making it work on my own but I've run into a bit of trouble that, after several days of struggle, I can't solve on my own.
Here's the trigger I've got so far:
The problem lies in the "while" loop for a unit that is spawned since it prevents the trigger from running and (while making the unit patrol) freezes the spawner from spawning more units.
In the end I hope on making a map that will spawn a set amount of spawners at random positions on a map, which will also respawn once killed at another random position on the map. These spawners will continuously spawn units who will patrol the area around it's spawner.
Is it possible to create the spawner I'm trying to do? Any ideas on how I could make it work? Eitherway, thanks in advance.
What you can do to fix this is too set your last nested while loop, the loop that checks if the unit is idle, in a new action. And flag the option Create Thread i the new action. Like this:
I am largely inactive, but I am still around. Feel free to poke me if you need some help, just be warned that I only really come back if I need help and/or if I'm posting a new map/library.
Hi guys. I'm in need of some help. I'm still very new to mapping and I'm by no means an expert, bear with me!
I'm trying to make a unit spawner, solely through the use of triggers. I want said spawner to spawn units who will patrol the nearby area but not wander off too far away from the spawner itself. I feel like I've been close at making it work on my own but I've run into a bit of trouble that, after several days of struggle, I can't solve on my own.
Here's the trigger I've got so far: The problem lies in the "while" loop for a unit that is spawned since it prevents the trigger from running and (while making the unit patrol) freezes the spawner from spawning more units.
In the end I hope on making a map that will spawn a set amount of spawners at random positions on a map, which will also respawn once killed at another random position on the map. These spawners will continuously spawn units who will patrol the area around it's spawner.
Is it possible to create the spawner I'm trying to do? Any ideas on how I could make it work? Eitherway, thanks in advance.
What you can do to fix this is too set your last nested while loop, the loop that checks if the unit is idle, in a new action. And flag the option Create Thread i the new action. Like this:
YOUR TRIGGER:
YOUR NEW ACTION:
@hellmapperextreme2013: Go
I would use an Action Definition (if you aren't already) and have it look something like:
The way you had it before I think was creating a nested iteration. And suffice it to say you can't have a while loop within a while loop.
Something similar to @Dryopes: Go, except it figures this out in the same trigger.
Thanks to you guys, it now works just as I want it to. You have no idea how grateful I am!