Hi again!
I got a somewhat weird thing this time. I have an ability which can be used on hostile units of any type, but just on friendly ones being organic and no building. The ability also needs special points to be casted.
The thing I don't get is that sometimes this check works and sometimes not. Help appreciated.
If I do the same check when the unit begins to cast the ability, it always gets cancelled if one of the conditions returns false, but I'd like to check those things when the order is issued so the unit does not have to get near to the target's location.
Thanks in advance
Triax
I got a somewhat weird thing this time. I have an ability which can be used on hostile units of any type, but just on friendly ones being organic and no building. The ability also needs special points to be casted.
The thing I don't get is that sometimes this check works and sometimes not. Help appreciated.
If I do the same check when the unit begins to cast the ability, it always gets cancelled if one of the conditions returns false, but I'd like to check those things when the order is issued so the unit does not have to get near to the target's location.
-
Check target
-
Events
- Unit - A unit Is issued an order targeting an object
-
Conditions
- (Issued order) Equal to (Order(shadowstrike))
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EnergyPoints[(Player number of (Owner of (Triggering unit)))] Less than or equal to 0.00
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
- Spiel - Display to (Player group((Owner of (Triggering unit)))) the text: |cffffcc00You have ...
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Target unit of ability being cast) belongs to an ally of (Owner of (Triggering unit))) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Target unit of ability being cast) is Mechanical) Equal to True
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
- Spiel - Display to (Player group((Owner of (Triggering unit)))) the text: |cffffcc00Allied ta...
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Target unit of ability being cast) is A treant) Equal to True
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
- Spiel - Display to (Player group((Owner of (Triggering unit)))) the text: |cffffcc00Allied ta...
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Life of (Target unit of ability being cast)) Greater or equal to (Max. life of (Target unit of ability being cast))
-
Then - Actions
- Unit - Order (Triggering unit) to Stop
- Spiel - Display to (Player group((Owner of (Triggering unit)))) the text: |cffffcc00That unit...
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
Triax