Moderator
M
Moderator
|
Aggro System v1.25 | Reviewed by Maker | 27th Mar 2013 | ||
| NEEDS FIX | ||
|
|
Setting A

Events


Map initialization

Conditions

Actions


-------- Aggro Player = Your friendly players --------


Player Group - Add Player 1 (Red) to A_Aggro_Player


-------- Aggroing Player = Your neutral creeps that will turn aggressive. --------


Player Group - Add Neutral Passive to A_Aggroing_Player


-------- Hostile Player = The ownership of the neutral creep will change to this player. --------


Set A_Hostile_Player = Player 8 (Pink)


-------- Changing Ability = The ability that will be removed or added once the unit changes ownership. --------


Set Changing_Ability = Wander (Neutral)


-------- Effect Range = This is the range in which the unit will change ownership. --------


-------- Only copy this variable if you are using Click or Range system. --------


Set A_Effect_Range = 550.00
Attack Aggro

Events


Unit - A unit Is attacked


Unit - A unit Starts the effect of an ability

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Triggering unit) Equal to (Casting unit)



Then - Actions




-------- Set the variables --------




Set A_Temp_Attacked = (Target unit of ability being cast)




Set A_Temp_Attacking = (Casting unit)




-------- Checking if the triggering units match with the set players --------



Else - Actions




Set A_Temp_Attacking = (Attacking unit)




Set A_Temp_Attacked = (Attacked unit)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Owner of A_Temp_Attacked) is in A_Aggroing_Player) Equal to True




((Owner of A_Temp_Attacking) is in A_Aggro_Player) Equal to True



Then - Actions




-------- If they do --------




Unit - Remove Changing_Ability from A_Temp_Attacked




-------- You can change the ownership by changing the A_Hostile_Player variable in the settings trigger. --------




Unit - Change ownership of A_Temp_Attacked to A_Hostile_Player and Change color




Unit - Order A_Temp_Attacked to Attack A_Temp_Attacking




Set A_Temp_Attacked = No unit




Set A_Temp_Attacking = No unit



Else - Actions
Clicking Aggro

Events


Unit - A unit Is issued an order targeting an object

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Target item of issued order) Not equal to No item



Then - Actions



Else - Actions




-------- Set the variables --------




Set A_Temp_Ordered_Unit = (Ordered unit)




Set A_Temp_Target_Unit = (Target unit of issued order)




Set Position_Unit = (Position of A_Temp_Ordered_Unit)




Set Position_TargetUnit = (Position of A_Temp_Target_Unit)




-------- Checking if the triggering units match with the set players --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Owner of A_Temp_Ordered_Unit) is in A_Aggro_Player) Equal to True






((Owner of A_Temp_Target_Unit) is in A_Aggroing_Player) Equal to True





Then - Actions






-------- Here I am adding in a certain range the targted creep has to be. --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Distance between Position_Unit and Position_TargetUnit) Less than or equal to A_Effect_Range







Then - Actions








-------- If you want to range limit cut and paste the two unit actions below into the "Then" above this "If (All Conditions)" action. --------








-------- If they are in range --------








Unit - Remove Changing_Ability from A_Temp_Target_Unit








-------- You can change the aggressive player by changing the A_Hostile_Player variable in the settings trigger. --------








Unit - Change ownership of A_Temp_Target_Unit to A_Hostile_Player and Change color








Set A_Temp_Ordered_Unit = No unit








Set A_Temp_Target_Unit = No unit








Set A_Range_Aggro = No unit







Else - Actions








Set A_Temp_Ordered_Unit = No unit








Set A_Temp_Target_Unit = No unit








Set A_Range_Aggro = No unit





Else - Actions






Set A_Temp_Ordered_Unit = No unit






Set A_Temp_Target_Unit = No unit






Set A_Range_Aggro = No unit


Custom script: call RemoveLocation (udg_Position_Unit)


Custom script: call RemoveLocation (udg_Position_TargetUnit)


Custom script: call DestroyGroup(udg_A_TempGroup)
Range Aggro

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


-------- Leave these triggers --------


-------- Set the varibles --------


Set A_TempGroup = (Units owned by (Random player from A_Aggro_Player))


Set A_Player_Unit = (Random unit from A_TempGroup)


Set Position_Unit = (Position of A_Player_Unit)


Custom script: call DestroyGroup(udg_A_TempGroup)


Set A_TempGroup = (Units within A_Effect_Range of Position_Unit matching ((Owner of (Matching unit)) Equal to (Random player from A_Aggroing_Player)))


Set A_Range_Aggro = (Random unit from A_TempGroup)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Owner of A_Range_Aggro) is in A_Aggroing_Player) Equal to True



Then - Actions




-------- If the unit is invisible to the neutral creep it will not change ownership. --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(A_Player_Unit is invisible to A_Neutral_Player) Equal to True





Then - Actions






-------- If you want your unit to make the neutral creeps turn hostile while it is invisible, cut and past the three unit actions fron "Else" to the "Then" section here. --------





Else - Actions






-------- If the unit isn't invisible. --------






Unit - Remove Changing_Ability from A_Range_Aggro






-------- You can change the ownership by changing the A_Hostile_Player variable in the settings trigger. --------






Unit - Change ownership of A_Range_Aggro to A_Hostile_Player and Change color






Unit - Order A_Range_Aggro to Attack A_Player_Unit



Else - Actions


Custom script: call RemoveLocation (udg_Position_Unit)


Custom script: call DestroyGroup(udg_A_TempGroup)
Setting N

Events


Map initialization

Conditions

Actions


-------- Trigger Player = You and your allies. --------


Player Group - Add Player 1 (Red) to N_Triggering_Player


-------- Hostile Player = Your agressive creeps that will turn neutral. --------


Player Group - Add Player 8 (Pink) to N_Hostile_Player


-------- Neutral Player = The ownership of the hostile creep will change to this player. --------


Set A_Neutral_Player = Neutral Passive


-------- Changing Ability = The ability that will be removed or added once the unit changes ownership. --------


Set Changing_Ability = Wander (Neutral)


-------- Effect Range = This is the range in which the unit will change ownership. --------


-------- Only copy this variable if you are using Click or Range system. --------


Set A_Effect_Range = 450.00
Attack Neutral

Events


Unit - A unit Is attacked


Unit - A unit Starts the effect of an ability

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Triggering unit) Equal to (Casting unit)



Then - Actions




-------- Set the variables --------




Set A_Temp_Attacked = (Target unit of ability being cast)




Set A_Temp_Attacking = (Casting unit)




-------- Checking if the triggering units match with the set players --------



Else - Actions




Set A_Temp_Attacking = (Attacking unit)




Set A_Temp_Attacked = (Attacked unit)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Owner of A_Temp_Attacked) is in N_Hostile_Player) Equal to True




((Owner of A_Temp_Attacking) is in N_Triggering_Player) Equal to True



Then - Actions




-------- If they do --------




Unit - Add Changing_Ability to A_Temp_Attacked




-------- You can change the ownership by changing the A_Neutral_Player variable in the settings trigger. --------




Unit - Change ownership of A_Temp_Attacked to A_Neutral_Player and Change color




Set A_Temp_Attacked = No unit




Set A_Temp_Attacking = No unit



Else - Actions
Clicking Neutral

Events


Unit - A unit Is issued an order targeting an object

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Target item of issued order) Not equal to No item



Then - Actions



Else - Actions




-------- Set the varibles --------




Set A_Temp_Ordered_Unit = (Ordered unit)




Set A_Temp_Target_Unit = (Target unit of issued order)




Set Position_Unit = (Position of A_Temp_Ordered_Unit)




Set Position_TargetUnit = (Position of A_Temp_Target_Unit)




-------- Checking if the triggering units match with the set players --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






((Owner of A_Temp_Ordered_Unit) is in N_Triggering_Player) Equal to True






((Owner of A_Temp_Target_Unit) is in N_Hostile_Player) Equal to True





Then - Actions






-------- Here I am adding in a certain range the targted creep has to be. --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Distance between Position_Unit and Position_TargetUnit) Less than or equal to A_Effect_Range







Then - Actions








-------- If you want to range limit cut and paste the two unit actions below into the "Then" above this "If (All Conditions)" action. --------








-------- If they are in range --------








Unit - Add Changing_Ability to A_Temp_Target_Unit








-------- You can change the aggressive player by changing the A_Hostile_Player variable in the settings trigger. --------








Unit - Change ownership of A_Temp_Target_Unit to A_Neutral_Player and Change color








Set A_Temp_Ordered_Unit = No unit








Set A_Temp_Target_Unit = No unit








Set A_Range_Aggro = No unit







Else - Actions








Set A_Temp_Ordered_Unit = No unit








Set A_Temp_Target_Unit = No unit








Set A_Range_Aggro = No unit





Else - Actions






Set A_Temp_Ordered_Unit = No unit






Set A_Temp_Target_Unit = No unit






Set A_Range_Aggro = No unit




Custom script: call RemoveLocation (udg_Position_Unit)




Custom script: call RemoveLocation (udg_Position_TargetUnit)




Custom script: call DestroyGroup(udg_A_TempGroup)
Range Neutral

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


-------- Set the varibles --------


Set A_TempGroup = (Units owned by (Random player from N_Triggering_Player))


Set A_Player_Unit = (Random unit from A_TempGroup)


Set Position_Unit = (Position of A_Player_Unit)


Custom script: call DestroyGroup(udg_A_TempGroup)


Set A_TempGroup = (Units within A_Effect_Range of Position_Unit)


Set A_Range_Aggro = (Random unit from A_TempGroup)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Owner of A_Range_Aggro) is in N_Hostile_Player) Equal to True



Then - Actions




-------- If the unit is invisible to the hostile creep it will not change ownership. --------




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(A_Player_Unit is invisible to A_Neutral_Player) Equal to True





Then - Actions






-------- If you want your unit to make the hostile creeps turn neutral while it is invisible, cut and past the two unit actions fron "Else" to the "Then" section here. --------





Else - Actions






-------- If the unit isn't invisible. --------






Unit - Add Changing_Ability to A_Range_Aggro






-------- You can change the ownership by changing the A_Neutral_Player variable in the settings trigger. --------






Unit - Change ownership of A_Range_Aggro to A_Neutral_Player and Change color



Else - Actions


Custom script: call RemoveLocation (udg_Position_Unit)


Custom script: call DestroyGroup(udg_A_TempGroup)