If you want a trigger, shouldn't this question be in the trigger forums? Or are you asking just how to realize the data portion, until you actually run the trigger?
I would just give the building a weapon starting a dummy effect. Specify your desired range and cooldown etc and possibly disable auto-attacking for the building, if you want. This effect starts a trigger; there is an event detecting the execution of a specific effect. You have access to the attacking unit and the target in the trigger, so you spawn your desired amount of units and order them to attack the target via trigger.
Giving the weapon to the building is as easy as for any other unit; you might just want to set the arc of the weapon to 360°, because buildings usually cannot turn.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
If you want a trigger, shouldn't this question be in the trigger forums? Or are you asking just how to realize the data portion, until you actually run the trigger?
I would just give the building a weapon starting a dummy effect. Specify your desired range and cooldown etc and possibly disable auto-attacking for the building, if you want. This effect starts a trigger; there is an event detecting the execution of a specific effect. You have access to the attacking unit and the target in the trigger, so you spawn your desired amount of units and order them to attack the target via trigger.
Giving the weapon to the building is as easy as for any other unit; you might just want to set the arc of the weapon to 360°, because buildings usually cannot turn.