Trigger:
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Triggering unit) Equal to (Attacked unit)
- Then - Actions
- Unit - Order (Triggering unit) to Attack (Attacking unit)
- Wait 0.20 seconds
- Trigger - Run (This trigger) (checking conditions)
- Else - Actions
- Unit - Order (Triggering unit) to Attack Castle 0002 <gen>
- Wait 0.20 seconds
- Trigger - Run (This trigger) (checking conditions)
U r using wrong comands
Try this
Trigger:
- Trigger
- Events
- Unit - A unit enters Team A <gen>
- Conditions
- (Unit-type of (Entering unit)) Equal to Footman
- Actions
- Set TempGroup = (Units in Team A <gen> matching (((Matching unit) is A structure) Equal to True))
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Order (Entering unit) to Attack (Picked unit)
- Custom script: call DestroyGroup(udg_TempGroup)
Yep it's attacking the building but isnt protecting himself if any of my units attacking him
Yep it's attacking the building but isnt protecting himself if any of my units attacking him