- Joined
- Feb 1, 2009
- Messages
- 111
-
Brainwash
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to (==) Brainwash
-
-

Actions
-


Set BrainWash_Loc[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
-


Set BrainWashed_Units[(Player number of (Owner of (Triggering unit)))] = (Units within 250.00 of BrainWash_Loc[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True)))
-


Set NonBrainwashed_Units[(Player number of (Owner of (Triggering unit)))] = (Units within 650.00 of BrainWash_Loc[(Player number of (Owner of (Triggering unit)))] matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to (==) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching un
-



Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-




If - Conditions
-





(Number of units in NonBrainwashed_Units[(Player number of (Owner of (Triggering unit)))]) Greater than (>) 0
-
-




Then - Actions
-





Game - Display to (All players) the text: (String((Number of units in NonBrainwashed_Units[(Player number of (Owner of (Triggering unit)))])))
-





Unit Group - Pick every unit in BrainWashed_Units[(Player number of (Owner of (Triggering unit)))] and do (Actions)
-






Loop - Actions
-







Unit - Change ownership of (Picked unit) to Player[(Player number of (Owner of (Triggering unit)))] and Change color
-
-






Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








(Player number of (Owner of (Casting unit))) Equal to (==) 1
-
-







Then - Actions
-








Countdown Timer - Start Brainwash_Timer1 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-







Else - Actions
-








Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










(Player number of (Owner of (Casting unit))) Equal to (==) 2
-
-









Then - Actions
-










Countdown Timer - Start Brainwash_Timer2 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-









Else - Actions
-










Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












(Player number of (Owner of (Casting unit))) Equal to (==) 3
-
-











Then - Actions
-












Countdown Timer - Start Brainwash_Timer3 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-











Else - Actions
-












Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














(Player number of (Owner of (Casting unit))) Equal to (==) 4
-
-













Then - Actions
-














Countdown Timer - Start Brainwash_Timer4 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-













Else - Actions
-














Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















(Player number of (Owner of (Casting unit))) Equal to (==) 5
-
-















Then - Actions
-
















Countdown Timer - Start Brainwash_Timer5 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-















Else - Actions
-
















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















(Player number of (Owner of (Casting unit))) Equal to (==) 6
-
-

















Then - Actions
-


















Countdown Timer - Start Brainwash_Timer6 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-

















Else - Actions
-


















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















(Player number of (Owner of (Casting unit))) Equal to (==) 7
-
-



















Then - Actions
-




















Countdown Timer - Start Brainwash_Timer7 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-



















Else - Actions
-




















Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





















If - Conditions
-






















(Player number of (Owner of (Casting unit))) Equal to (==) 8
-
-





















Then - Actions
-






















Countdown Timer - Start Brainwash_Timer8 as a One-shot timer that will expire in ((2.00 x (Real((Level of Brainwash for (Triggering unit))))) + 5.00) seconds
-
-





















Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-




Else - Actions
-





Custom script: call Error_Brainwash( GetOwningPlayer( GetTriggerUnit() ), "You can only brainwash units if there are other enemy units nearby" )
-
-
-
-


Custom script: call RemoveLocation(udg_BrainWash_Loc[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
-


Custom script: call DestroyGroup (udg_NonBrainwashed_Units[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
-
-
NOTE: I have cleaned the following leak in another trigger:
-
Custom script: call DestroyGroup (udg_BrainWashed_Units[1])


