My latest plaything is trying to create some kind of flare launcher for HWPs.
Right now I added a grenade launcher to a HWP which is set up with spawnUnit to create a unit which is supposed to drop an electric flare. The unit is supposed to be insta-killed using the createUnit: hook and setting its health to 0. The game doesn't update the state of said unit from alive to dead. The state will be updated once another shot is taken or the turn is ended. I experimented with another bunch of options (skills which aren't available to units:, setSpawnUnit using inside the createUnit script and a few other things).
When talking about my fun experiences in Matrix, Yankes suggested that maybe this can be solved with setSpawnItem. A setSpawnItem next to setSpawnUnit would be really cool.
As always thank you for looking at the suggestion.