I tried it the way drsuperevil said and I couldn't get it to work, but I was able to get it to work with triggers and maybe now I can figure it out with validators or something.
Prevent Attacking Air
Events
Unit - Any Unit acquires a target
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Acquired Target) has Flying) == True
((Triggering unit) has Flying) == False
((Triggering unit) has Reach) == False
Then
Unit - Order (Triggering unit) to ( Move targeting ((Position of (Triggering unit)) offset by (0.0, 1.0))) (Before Existing Orders)
Else
bleh. I tried all the available options in there, didn't have any effect.
If you have ever played magic the gathering, I'm trying to induce some system where if a unit
has a buff flying, it can only be attacked by a unit with flying or reach.
I've been working on a validator that allows the unit to attack air units or ground units if it has "reach" or "flying".
Problem is I want to keep it as generic as possible so i can add other behaviors like protection and unblockable.
I'm trying to deny generic unit the ability to attack another group of generic units that have a certain buff. I can make the system work. If i add a validator to the weapon denying the attack, but I was wondering if there was a more generic way to implement this, either via behaviors or triggers.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I tried it the way drsuperevil said and I couldn't get it to work, but I was able to get it to work with triggers and maybe now I can figure it out with validators or something.
Prevent Attacking Air
Events
Unit - Any Unit acquires a target
Local Variables
Conditions
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Acquired Target) has Flying) == True
((Triggering unit) has Flying) == False
((Triggering unit) has Reach) == False
Then
Unit - Order (Triggering unit) to ( Move targeting ((Position of (Triggering unit)) offset by (0.0, 1.0))) (Before Existing Orders)
Else
@patrickwobben: Go
bleh. I tried all the available options in there, didn't have any effect. If you have ever played magic the gathering, I'm trying to induce some system where if a unit has a buff flying, it can only be attacked by a unit with flying or reach.
I've been working on a validator that allows the unit to attack air units or ground units if it has "reach" or "flying". Problem is I want to keep it as generic as possible so i can add other behaviors like protection and unblockable.
I'm trying to deny generic unit the ability to attack another group of generic units that have a certain buff. I can make the system work. If i add a validator to the weapon denying the attack, but I was wondering if there was a more generic way to implement this, either via behaviors or triggers.