Soldier.getSuppressionValue 103
Checks the suppression value of the soldier from the enemy fire.
Return value
Return Type | Description |
---|---|
float | The value ranges from 0 (no suppression) to 1 (max level of suppression) |
No parameters defined for this function.
Examples
Example 111
-- In the AI brain, get a reference to the soldier
local soldier = myself()
sleep(0.1)
--While the soldier is alive, check his suppression status
while soldier.isAlive do
if (soldier.getSuppressionValue > 0.5) then
-- If the suppression value is higher than 0.5 (under heavy fire) kill the soldier
soldier.killSoldier()
end
sleep(0.1)
end