Ok, so I've been trying to work with this ability that creates an auto turret. I have it working correctly, but theres a little extra I would like to do to it, without using triggers if its possible. Right now, I made a complete copy of the Raven's place Auto-Turret ability, but removed the life timer from it. Now what I want to do, is make it so that if the unit places another turret the old one gets destroyed. So far I can only do it with triggers, but I would like to do it without the triggers. Any ideas?
in the unit actor, have the turret destroy itself when the caster casts the create turret ability, this should also prevent the create=destroy loops that a lot of event driven actions in the actor would give you.
if there is a tme between the cast and the creation of the turret, add a cooldown (longer than said time) to the ability to prevent rapid creation of multiple turrets.
Ok, I'm missing something, in the turrets actor, I add an event Abil.PlaceTurret - Destroy an its still not working. Is that something what you were talking about?
Could someone explain this to me in more detail? I'm not that good with Actor Events, if thats what GeEom is referring to. Or, if there is some other way to do this.
Ok, i got it to work part of the way. I don't if I need all this but, what I've got so far is a requirement: Less than or equal to - count unit turret queued or better at unit - constant 1. Then I have a validator (player requirement) that checks the requirement. I then have Two behaviors, two effects, and one ability. The Ability is a behavior ability that applies one of the behaviors. The behavior that it applies destroys the turret through a damage effect I created (kill flag). The other effect issues the order for the ability. The second behavior I set on the turret itself, an have it so that when the validator returns false this behavior is removed, which, then calls the issue order effect. If anyone follows that. Basically it works like - when >1 turret, remove this behavior, when behavior is removed, apply that behavior, when that behavior is applied, destroy turret. The problem now is, that it only works after the second turret is placed (i.e. Place one turret, then place the 2nd, first gets destroyed, after that, turrets no longer get destroyed). So if anyone understood that what-so-ever, and maybe has an idea how to get that process to repeat for every turret, it would be much appreciated.
I sort of got it to work, I haven't tested to see if it interferes with other players, but so far I have two behaviors, two effects, two abilites, one requirement, and one validator. The two effects are set up like so:
Turret(Death) Damage Effect: Effect - Flags - Kill, Target - Impact Location - Value - Source Unit
Turret (Issue Order) Issue Order Effect: Ability - Ability - Turret (Behavior), Unit - Unit - Value - Caster
The only problem, not really a big a problem, but something I'd like to fix, is that it works as a whole for the player, i.e. you have two units using the deploy turret ability, if you place a turret with one unit, then go to place a turret with the other unit, unit one's turret gets destroyed. I would like it to work for each unit individually, where each unit would be able to place one turret. I'll work with it, an post if I get it to work that way.
EDIT: I forgot to mention, in the turrets ability command list (Abilities - Ability, not the command card), you have to add both abilities, but not the actual button since one is set to auto cast initially, and the other has an affect that issues the command automatically.
Ok, so I've been trying to work with this ability that creates an auto turret. I have it working correctly, but theres a little extra I would like to do to it, without using triggers if its possible. Right now, I made a complete copy of the Raven's place Auto-Turret ability, but removed the life timer from it. Now what I want to do, is make it so that if the unit places another turret the old one gets destroyed. So far I can only do it with triggers, but I would like to do it without the triggers. Any ideas?
in the unit actor, have the turret destroy itself when the caster casts the create turret ability, this should also prevent the create=destroy loops that a lot of event driven actions in the actor would give you.
if there is a tme between the cast and the creation of the turret, add a cooldown (longer than said time) to the ability to prevent rapid creation of multiple turrets.
@GeEom: Go
Ok, I'm missing something, in the turrets actor, I add an event Abil.PlaceTurret - Destroy an its still not working. Is that something what you were talking about?
@Jones2412: Go
Could someone explain this to me in more detail? I'm not that good with Actor Events, if thats what GeEom is referring to. Or, if there is some other way to do this.
@Jones2412: Go
Ok, i got it to work part of the way. I don't if I need all this but, what I've got so far is a requirement: Less than or equal to - count unit turret queued or better at unit - constant 1. Then I have a validator (player requirement) that checks the requirement. I then have Two behaviors, two effects, and one ability. The Ability is a behavior ability that applies one of the behaviors. The behavior that it applies destroys the turret through a damage effect I created (kill flag). The other effect issues the order for the ability. The second behavior I set on the turret itself, an have it so that when the validator returns false this behavior is removed, which, then calls the issue order effect. If anyone follows that. Basically it works like - when >1 turret, remove this behavior, when behavior is removed, apply that behavior, when that behavior is applied, destroy turret. The problem now is, that it only works after the second turret is placed (i.e. Place one turret, then place the 2nd, first gets destroyed, after that, turrets no longer get destroyed). So if anyone understood that what-so-ever, and maybe has an idea how to get that process to repeat for every turret, it would be much appreciated.
@Jones2412: Go
I sort of got it to work, I haven't tested to see if it interferes with other players, but so far I have two behaviors, two effects, two abilites, one requirement, and one validator. The two effects are set up like so:
@Jones2412: Go
The only problem, not really a big a problem, but something I'd like to fix, is that it works as a whole for the player, i.e. you have two units using the deploy turret ability, if you place a turret with one unit, then go to place a turret with the other unit, unit one's turret gets destroyed. I would like it to work for each unit individually, where each unit would be able to place one turret. I'll work with it, an post if I get it to work that way.
EDIT: I forgot to mention, in the turrets ability command list (Abilities - Ability, not the command card), you have to add both abilities, but not the actual button since one is set to auto cast initially, and the other has an affect that issues the command automatically.