In a map I'm making, there are towers which have limited ammo and fire only when ordered to Attack Ground (and which are given a Stop order to make sure they only fire once per Attack Ground order).
The issue I have is that to make it work properly, I need to subtract from their ammo count precisely when they actually fire. If I subtract when they're merely ordered to fire, then the ammo is deducted for nothing if the player gives another order before the tower actually shoots.
If the towers had Combat - Weapon Type : Missile, I could just give them Searing Arrows or something and track when the mana is subtracted easily enough. However, the towers need to have Artillery weapon type, which means Searing Arrows won't work for them. Is there another good way to detect precisely when the projectile fires?
Failing that, another option which would work nearly as well would be to make the tower unresponsive to further orders for, say, half a second after getting the initial Attack Ground order. In that case, I could just subtract ammo when the order is given and the hapless player couldn't waste ammunition by issuing another order before the shot actually happens.
However, I don't want to prevent further orders by doing things like changing the turret's owner temporarily or deselecting it and making it temporarily unselectable. It's important that the interface be as convenient as possible for firing several shots in quick succession, so I'd need the tower to stay selected but just ignore all new orders until it finished firing. Is there a way to do that?
The issue I have is that to make it work properly, I need to subtract from their ammo count precisely when they actually fire. If I subtract when they're merely ordered to fire, then the ammo is deducted for nothing if the player gives another order before the tower actually shoots.
If the towers had Combat - Weapon Type : Missile, I could just give them Searing Arrows or something and track when the mana is subtracted easily enough. However, the towers need to have Artillery weapon type, which means Searing Arrows won't work for them. Is there another good way to detect precisely when the projectile fires?
Failing that, another option which would work nearly as well would be to make the tower unresponsive to further orders for, say, half a second after getting the initial Attack Ground order. In that case, I could just subtract ammo when the order is given and the hapless player couldn't waste ammunition by issuing another order before the shot actually happens.
However, I don't want to prevent further orders by doing things like changing the turret's owner temporarily or deselecting it and making it temporarily unselectable. It's important that the interface be as convenient as possible for firing several shots in quick succession, so I'd need the tower to stay selected but just ignore all new orders until it finished firing. Is there a way to do that?