takethat
Active Member
- Reaction score
- 12
i am trying to make a skill that will tell you how many (specific) unit infront of the casting unit. but this gui will still pick every unit in that range.
Trigger:
- test01
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) == Test call
- Actions
- Set TempPoint1 = (Position of (Triggering unit))
- Set TempGroup1 = (Units within 1000.00 of TempPoint1 matching ((Unit-type of (Matching unit)) == Footman))
- Set TempInt = (Number of units in TempGroup1)
- For each (Integer A) from 1 to TempInt, do (Actions)
- Loop - Actions
- Set TempUnit1 = (First unit of TempGroup1)
- Set TempPoint2 = (Position of TempUnit1)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Angle from TempPoint1 to TempPoint2) <= 10.00
- (Angle from TempPoint1 to TempPoint2) >= 170.00
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Unit Group - Remove TempUnit1 from TempGroup1
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_TempPoint2)
- Loop - Actions
- Game - Display to (All players) the text: (String((Number of units in TempGroup1)))
- Custom script: call DestroyGroup(udg_TempGroup1)
- Custom script: call RemoveLocation(udg_TempPoint1)
- Events