Limit Attackers System
Description
Limits the number of units that can attack a given unit type at the same time.
Made by request for shermellow:
Limit Number of Attackers
(for a farm-type unit that is attacked for resources)
Probably useful for Tower Defense maps.
Does not work for attack ground, and probably not for Frost Arrow-type ability target casting.
Fires an event (LAS_Event == 1.00) when a unit is prevented from attacking, saving the attacking and attacked units to variables.
Installation
Pre-requisite: Bribe's
Unit Indexer (included)
Installation:
1. If your map doesn't have a unit indexing system, copy Bribe's Unit Indexer (included) to your map
2. Copy the trigger category "Limit Attackers System" into your map (make sure "Automatically create unknown variables" is enabled in editor preferences)
3. Configure your units in the LAS Config trigger
4. Set the array size of LAS_Group to 8000.
Triggers
Changelog
1.02
- Cooldown period is now configurable
- A limit of 0 now means the unit cannot be attacked
1.01
- Added event
- Removed redundant cooldown loop
Credits
Bribe - Unit Indexer.
shermellow - Idea.
Keywords:
limit attackers, limit, attacker, attackers, stop attackers,