setHit – Talk
Jump to navigation
Jump to search
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.
Lou Montana (talk | contribs) m (Text replacement - "ArmA 3" to "Arma 3") |
Lou Montana (talk | contribs) m (Text replacement - " <!-- Note Section [A-Z]+ -->" to "") |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
<dt><dt> | |||
<dd class="notedate"> | <dd class="notedate"> | ||
<dt class="note">[[User:LongEnoughName|Sa-Matra]] | <dt class="note">[[User:LongEnoughName|Sa-Matra]]</dt> | ||
<dd class="note">Since there is no [[getHit]] (as of A2OA 1.61), you can use [[canMove]] command to check if vehicle is capable of moving.<br> | <dd class="note">Since there is no [[getHit]] (as of A2OA 1.61), you can use [[canMove]] command to check if vehicle is capable of moving.<br> | ||
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. | 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. | ||
Line 15: | Line 15: | ||
'''Update:''' Since Arma 3 1.31 [[getHit|getHit]] has been introduced. | '''Update:''' Since Arma 3 1.31 [[getHit|getHit]] has been introduced. | ||
Latest revision as of 01:01, 6 April 2021
Historic notes
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.