Ive used the warpgate to make a ability that spawns zerglings, however i want it to spawn like 2 (im gonna make it give 3/4/5/ ect as you level up) help pleae! :) ty
I think you can use those two. I don't have the editor installed so I can't check. But there is an event something like "if a unit is created by another unit",
Look up Unit, and Unit created. I think it's somewhere in there. Maybe it is a condition "triggering unit is creted by unit"
Now the number of units created by the action can be equal to an integer. So you just modify the integer +1 each time you want more units created.
That's about the only way you want to do it via triggers. Really if you want the warpgate creating units the way it normally does in the game, then it's a Data editor question.
If you are using triggers to create the units then just have a "create unit at location facing point." action and set the number of units to = the integer.
So it will look something like this.
If Unit Zergling is created, then
If the Triggering Unit is created by unit Warp Gate, then
Create unit Integer 0 Zerglings at triggering unit.
or
If Your Event Trigger, then
Do this stuff, as well as
Create unit Integer 0 Zerglings at (triggering unit, or Point, or Region or Coordinates).
Use data, in the Unit field for your train ability, where you added a Zergling, just add another one and you will get 2 each time (cost is also doubled). There's a way to add the extra zerglings but I don't know how it works, but you can always create more than one "Spawn Zerglings" entry, one with 2, one with 3, so on up to 5... and enable/disable them using the right requirements.
For a triggers only solution, stevehammon was on the right track. The event that will help you here is "Unit - Any Unit creates a unit with ability Any or behavior Any." Set the ability to the train ability of your warp gate. Then you can create additional Zerglings at the position of [created unit]. This will prevent infinite loops that might occur from using a "Unit Enters Region" event.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Ive used the warpgate to make a ability that spawns zerglings, however i want it to spawn like 2 (im gonna make it give 3/4/5/ ect as you level up) help pleae! :) ty
if unit creates unit
then
Create unit at location facing point.
I think you can use those two. I don't have the editor installed so I can't check. But there is an event something like "if a unit is created by another unit",
Look up Unit, and Unit created. I think it's somewhere in there. Maybe it is a condition "triggering unit is creted by unit"
Now the number of units created by the action can be equal to an integer. So you just modify the integer +1 each time you want more units created.
That's about the only way you want to do it via triggers. Really if you want the warpgate creating units the way it normally does in the game, then it's a Data editor question.
If you are using triggers to create the units then just have a "create unit at location facing point." action and set the number of units to = the integer.
So it will look something like this.
If Unit Zergling is created, then
If the Triggering Unit is created by unit Warp Gate, then
Create unit Integer 0 Zerglings at triggering unit.
or
If Your Event Trigger, then
Do this stuff, as well as
Create unit Integer 0 Zerglings at (triggering unit, or Point, or Region or Coordinates).
Hope this helps.
Use data, in the Unit field for your train ability, where you added a Zergling, just add another one and you will get 2 each time (cost is also doubled). There's a way to add the extra zerglings but I don't know how it works, but you can always create more than one "Spawn Zerglings" entry, one with 2, one with 3, so on up to 5... and enable/disable them using the right requirements.
For a triggers only solution, stevehammon was on the right track. The event that will help you here is "Unit - Any Unit creates a unit with ability Any or behavior Any." Set the ability to the train ability of your warp gate. Then you can create additional Zerglings at the position of [created unit]. This will prevent infinite loops that might occur from using a "Unit Enters Region" event.