Well I have no idea how to make unit go back to initial owner without a wait action (im not using it, its my miserable try to return the owner)
The idea of the spell is: Charms the target, if the buff ends or charmed unit is below 50% health - return it to original owner
The idea of the spell is: Charms the target, if the buff ends or charmed unit is below 50% health - return it to original owner
-
INS cast
-
Events
-
Unit - A unit Starts an effect of the Ability
-
-
Conditions
-
(Ability being cast) Equal to Insanity
-
-
Actions
-
Unit Group - Add (Target unit of ability being cast) to INS_Group
-
-------- --------
-
Set Temppoint = (Position of (Target unit of ability being cast))
-
Unit - Create 1 Dummy for (Triggering Player) at Temppoint facing default building facing degrees
-
Custom script: call RemoveLocation(udg_Temppoint)
-
Unit - Add Insanity dummy to (Last created unit)
-
Unit - Order (Last created unit) to Human - Priest: Inner Fire (Target unit of ability being cast)
-
Unit - Add a 0.50 second generic expiration timer to (Last created unit)
-
Unit Group - Pick every unit in INS_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Insanity ) Equal to True
-
-
Then - Actions
-
Unit - Change ownership of (Picked unit) to (Triggering Player) and Change Color
-
-
Else - Actions
-
-
-
-
Trigger - Turn on INS charm <gen>
-
-
-
INS charm
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
(Number of units in INS_Group) Greater than 0
-
-
Actions
-
Unit Group - Pick every unit in INS_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Insanity ) Equal to False
-
-
Then - Actions
-
Unit - Change ownership of (Picked unit) to (Previous owner) and Change Color
-
Unit Group - Remove (Picked unit) from INS_Group
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage life of (Picked unit)) Lesser than or Equal to 50.00
-
-
Then - Actions
-
Unit - Change ownership of (Picked unit) to (Previous owner) and Change Color
-
Unit Group - Remove (Picked unit) from INS_Group
-
-
Else - Actions
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in INS_Group) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Last edited: