- Joined
- Jun 27, 2010
- Messages
- 2,763
Here I'm trying to create a spell - it saves nearby X units that respond to your conditions, and when cast again to move them back. I'm making this with Bribe's Indexer. However, it's not working - the indexing. It's like somehow it bugs the map. I tried to use init to show the custom value of a unit, with message, but nothing shows. In another empty map I did it only with putting message and it worked. Can you look at it and tell me what's the problem?
LINK
But better open the map
LINK
But better open the map
-
AR Config
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- SET VARIABLES DEPENDING ON YOUR PREFERENCES --------
-
-------- -------------------------------------------------------------------------- --------
-
-------- TRUE variables will include such units in the spell --------
-
Set AR_Target_Owned_Units = True
-
Set AR_Target_Heroes = True
-
Set AR_Target_Flying = True
-
Set AR_Target_Ground = True
-
Set AR_Target_Mechanical = True
-
Set AR_Target_Ally_Units = False
-
Set AR_Target_Enemy_Units = False
-
Set AR_Target_Buildings = False
-
Set AR_Target_Passive_Units = False
-
Set AR_Target_Magic_Immuned = False
-
-------- The range in which the spell pick units --------
-
Set AR_Range = 600.00
-
-------- The number of Units Picked for each level of the spell --------
-
Set AR_Units_Picked[1] = 3
-
Set AR_Units_Picked[2] = 4
-
Set AR_Units_Picked[3] = 5
-
-------- -------------------------------------------------------------------------- --------
-
-------- END OF CONFIGURATION --------
-
-
-
AR cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Arcane Recall
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Casted[(Custom value of (Triggering unit))] Equal to False
-
-
Then - Actions
-
Set AR_Position = (Position of (Triggering unit))
-
Set AR_Pick[(Custom value of (Triggering unit))] = (Units within AR_Range of AR_Position)
-
Custom script: call RemoveLocation(udg_AR_Position)
-
Unit Group - Remove (Triggering unit) from AR_Pick[(Custom value of (Triggering unit))]
-
Unit Group - Pick every unit in AR_Pick[(Custom value of (Triggering unit))] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Ally_Units Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Triggering unit)) is an ally of (Owner of (Picked unit))) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Buildings Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A structure) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Flying Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A flying unit) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Magic_Immuned Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is Magic Immune) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Mechanical Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is Mechanical) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Ground Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A ground unit) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Enemy_Units Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Triggering unit)) is an enemy of (Owner of (Picked unit))) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Heroes Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is A Hero) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
AR_Target_Passive_Units Equal to False
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Picked unit)) Equal to Neutral Passive
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
For each (Integer A) from 1 to 100, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in AR_Pick[(Custom value of (Triggering unit))]) Greater than AR_Units_Picked[(Level of Arcane Recall for (Triggering unit))]
-
-
Then - Actions
-
Unit Group - Remove (Random unit from AR_Pick[(Custom value of (Triggering unit))]) from AR_Pick[(Custom value of (Triggering unit))]
-
-
Else - Actions
-
Unit Group - Pick every unit in AR_Pick[(Custom value of (Triggering unit))] and do (Actions)
-
Loop - Actions
-
Set AR_Position = (Position of (Picked unit))
-
Set AR_OldPos[(Custom value of (Picked unit))] = (Position of (Picked unit))
-
Special Effect - Create a special effect at AR_Position using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_AR_Position)
-
-
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in AR_Pick[(Custom value of (Triggering unit))]) Greater than 0
-
-
Then - Actions
-
Set AR_Casted[(Custom value of (Triggering unit))] = True
-
-
Else - Actions
-
-
-
Else - Actions
-
Unit Group - Pick every unit in AR_Pick[(Custom value of (Triggering unit))] and do (Actions)
-
Loop - Actions
-
Set AR_Position = (Position of (Picked unit))
-
Special Effect - Create a special effect at AR_Position using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set AR_OldPos[(Custom value of (Picked unit))] = (Position of (Picked unit))
-
Special Effect - Create a special effect at AR_OldPos[(Custom value of (Picked unit))] using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Move (Picked unit) instantly to AR_OldPos[(Custom value of (Picked unit))]
-
Custom script: call RemoveLocation(udg_AR_OldPos[GetUnitUserData(GetEnumUnit())])
-
-
-
Set AR_Casted[(Custom value of (Triggering unit))] = False
-
-
-
-
Last edited: