- KnowsAboutChanged :
Currently the KnowsAboutChanged event handler triggers for more than just valid targets (those returned by targets/targetsQuery commands). For example see this comment: T161515#2281413
Some of those are not valid targets (e.g. misc objects such as modules, decals, props, etc. are returned too)
I can't think of any reason why the scripter should be interested in those objects anyway. So they should be filtered out.
- EnemyDetected:
The event handler doesn't seem to trigger at all.
- UnitLeft:
if you do [unit] joinSilent someGrp (someGrp can also be grpNull) the group of the left unit is grpNull when the EH triggers. It should trigger after the unit has a group (group of a unit should never be null)
- CombatModeChanged:
It only triggers if the Combat Mode changes automatically. It doesn't trigger if you do it via commanding menu or scripting commands (e.g grp setCombatMode "BLUE" or grp setCombatMode "RED" doesn't trigger)
- EnableAttackChanged:
Doesn't seem to trigger:
group player enableAttack !attackEnabled group player
- Fleeing:
Always shows true for the fleeing value.
Simply create an enemy officer with no weapons, name his group grp and shoot towards him a few times to make him flee:
grp addEventHandler ["Fleeing", { systemChat str ["ch", _this]; }]; [] spawn { waitUntil {fleeing leader grp}; systemChat "fleeing"; waitUntil {!fleeing leader grp}; systemChat "not fleeing" }
Feature Requests:
- CombatModeChanged: Should also be a unit event handler, since combat mode can be changed per unit (maybe that's why the group version doesn't work?)
- BehaviourChanged: Another very useful EH. Should be both a group and unit EH.
- CommandChanged: A unit EH that triggers when any parameter in the unit's currentCommand or expectedDestination changes. For a simple use case, it can be used instead of looping to detect when unit is ready: waitUntil {unitReady unit}