19,495
edits
(→Variants, geometry, health, etc.: moved supershield info to new Shields page) |
(→HurtSoundConstants: corrected my explanation of the odds calculation) |
||
Line 220: | Line 220: | ||
| <PercentageThreshold> | | <PercentageThreshold> | ||
| int16 | | int16 | ||
| Always 15; | | Always 15; minimum damage needed to have maximum chance of playing pain sound (see below for elaboration) | ||
|- | |- | ||
| <Timer> | | <Timer> | ||
Line 275: | Line 275: | ||
|} | |} | ||
If the AI is in an alerted state | If the AI is in an alerted state and has not been hurt within the last <Timer> ticks, the odds of playing a pain sound are as follows: if damage being done is at least <PercentageThreshold>, the chance of playing a pain sound is <MaxPercentage>; if less than <PercentageThreshold>, then the chance is <BasePercentage> + (damage done * (<MaxPercentage> - <BasePercentage>)) / <PercentageThreshold>. This ramps up the odds of the pain sound from <BasePercentage> to <MaxPercentage> as the damage runs from 1 HP (38% chance) to 14 HP (86% chance). If the AI is alerted but has already received damage within the last <Timer> ticks, they will not play a pain sound. If the AI was ''not'' in an alerted state before being hit, they will always play a pain sound. | ||
==<AIConstants>== | ==<AIConstants>== |