Leazy
You can change this now in User CP.
- Reaction score
- 50
Hey!
I try to add a unit to a local group using:
I get error message saying "Expected 'endif'"
This is the whole trigger:
I try to add a unit to a local group using:
Code:
Custom script: Call GroupAddUnitSimple( udg_Target, Knocked )
I get error message saying "Expected 'endif'"
This is the whole trigger:
Trigger:
- Repulsion Totem Repel
- Events
- Time - Every 0.03 seconds of game time
- Conditions
- Actions
- Custom script: local group Knocked
- Unit Group - Pick every unit in RepulsionTotem_Group and do (Actions)
- Loop - Actions
- Set Caster = (Picked unit)
- Set Point[1] = (Position of Caster)
- Set Group[1] = (Units within 300.00 of Point[1] matching ((((Matching unit) belongs to an enemy of (Owner of Caster)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is in Knockback_Group) Equal to False))))
- Unit Group - Pick every unit in Group[1] and do (Actions)
- Loop - Actions
- Set Target = (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Target is in Repel_Group) Equal to False
- Then - Actions
- Set Point[2] = (Position of Target)
- Set Damage = ((Max life of Target) x 0.08)
- Unit - Cause Caster to damage Target, dealing Damage damage of attack type Normal and damage type Normal
- Set Knockback_Angle[(Custom value of Target)] = (Angle from Point[1] to Point[2])
- Set Knockback_Time[(Custom value of Target)] = 0.40
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Distance between Point[1] and Point[2]) + 150.00) Greater than 300.00
- Then - Actions
- Set Knockback_Distance[(Custom value of Target)] = 150.00
- Else - Actions
- Set Knockback_Distance[(Custom value of Target)] = ((Distance between Point[1] and Point[2]) + 50.00)
- If - Conditions
- Unit Group - Add Target to Knockback_Group
- Unit Group - Add Target to Repel_Group
- Trigger - Turn on Knockback <gen>
- Custom script: Call GroupAddUnitSimple( udg_Target, Knocked )
- Custom script: call RemoveLocation (udg_Point[2])
- Else - Actions
- Unit Group - Remove Target from Group[1]
- If - Conditions
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Group[1] is empty) Equal to False
- Then - Actions
- For each (Integer A) from 1 to 18, do (Actions)
- Loop - Actions
- For each (Integer B) from 1 to 6, do (Actions)
- Loop - Actions
- Set Point[2] = (Point[1] offset by (50.00 x (Real((Integer B)))) towards ((360.00 / 18.00) x (Real((Integer A)))) degrees)
- Special Effect - Create a special effect at Point[2] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation (udg_Point[2])
- Loop - Actions
- For each (Integer B) from 1 to 6, do (Actions)
- Loop - Actions
- For each (Integer A) from 1 to 18, do (Actions)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation (udg_Point[1])
- Custom script: call DestroyGroup (udg_Group[1])
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (RepulsionTotem_Group is empty) Equal to True
- Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
- If - Conditions
- Wait 2.00 seconds
- Custom script: set Knocked = udg_Group[1]
- Unit Group - Pick every unit in Group[1] and do (Unit Group - Remove (Picked unit) from Repel_Group)
- Custom script: call DestroyGroup (Knocked)
- Events