Note | ||
---|---|---|
| ||
The event is "throttled", which means that it won't be called for every single attack. If I understand the C++ source code correctly, Warzone has it's own clustering algorithm that groups your droids and structures in to clusters. When something in a cluster is attacked, the event will be triggered once for that attack (not once for each unit/structure that was damaged) and then there is a short delay before any further attacks on that cluster will trigger the event again. This means that you can't use this event eventAttacked() to micromanage units in combat - instead use eventAttackedUnthrottled() which gets called on every single attack. |
Overview
Excerpt |
---|
This event is called when your droids or structures are attacked. |
...
- bind() – monitor when stuff that doesn't belong to you gets destroyed
- Droids – summary of all API features relating to droids
- eventAttackedUnthrottled() – unthrottled version of eventAttacked()
- eventDestroyed() – monitor when your stuff gets destroyed
- Structures – summary of all API features relating to structures