setHit – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search

Historic notes

Sa-Matra
Since there is no getHit (as of A2OA 1.61), you can use canMove command to check if vehicle is capable of moving.
For land wheeled vehicles canMove will return false if any real wheel (damaging nonexistent wheels doesn't count) has hitpoint damage greater than 0.9. Having HitEngine damage greater than 0.9 will make canMove to return false as well (plus will result in vehicle exploding). HitFuel however doesn't make canMove return false even though having high HitFuel damage will make car explode.
For helicopters HitEngine with damage greater than 0.9 will make canMove return false as well. Having HitHRotor (main rotor) damaged even up to 1 will never make canMove return false. However, if HitVRotor (tail rotor) will have damage greater than 0.703608 it will make canMove return false (even though some helicopters are controllable and flyable by player with broken tail rotor).
You can use canFire the same way in order to check if turret hitpoints are not damaged enough to be able to fire. (canFire always returns false if there is no gunner in the vehicle). Update: Since Arma 3 1.31 getHit has been introduced.