I'm trying to create an ability that spawns units around itself like an apple tree drops apples.
I also want it to be like Zerg Hatcherys and stop spawning when more than 3 "Fruit" are present. Furthermore, I want the ability to consume energy and stop functioning when the unit runs out of energy.
I've had some trouble implementing BOTH of these requirements.
I began by using the Zerg Hatchery's spawn larva behavior. But I was unable to prevent the behavior from spawning units when the "Tree" ran out of energy. I tried adding validators to check energy, but they do not function properly.
I then created an autocast ability that successfully manages its energy but ignores my 3 unit or less requirement.
I was wondering if anyone had any advice or could point me in the right direction.
I went back and took a look at the ability. The Validators are done correctly. The reason they aren't working is because I have to use the Hatchery's behavior and it does not allow validators. In an attempt to get around this I had this behavior run an effect instead of spawning a unit. This unfortunately does not seem to be working correctly either.
So I'm pretty much back to square one. I'll try creating a new behavior instead of basing it off the Hatchery behavior.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm trying to create an ability that spawns units around itself like an apple tree drops apples.
I also want it to be like Zerg Hatcherys and stop spawning when more than 3 "Fruit" are present. Furthermore, I want the ability to consume energy and stop functioning when the unit runs out of energy.
I've had some trouble implementing BOTH of these requirements.
I began by using the Zerg Hatchery's spawn larva behavior. But I was unable to prevent the behavior from spawning units when the "Tree" ran out of energy. I tried adding validators to check energy, but they do not function properly.
I then created an autocast ability that successfully manages its energy but ignores my 3 unit or less requirement.
I was wondering if anyone had any advice or could point me in the right direction.
Quote from Mozez123:. I tried adding validators to check energy, but they do not function properly.
Yes they do. You were probably using a validator that checked the target's energy instead of the caster's or something along those lines.
@RileyStarcraft: Go
I went back and took a look at the ability. The Validators are done correctly. The reason they aren't working is because I have to use the Hatchery's behavior and it does not allow validators. In an attempt to get around this I had this behavior run an effect instead of spawning a unit. This unfortunately does not seem to be working correctly either.
So I'm pretty much back to square one. I'll try creating a new behavior instead of basing it off the Hatchery behavior.