Three new key/value pairs have been added to Spirit 1.4 that concern the calc_ratio entity:
These keys allow you to change the ratio or value an object return when it is queried by a calc_ratio entity. Typically ratio values would only return the health of a monster/player, the charge of a healthcharger/HEVcharger, or the position of a momentary door. Some significant additions have made the Locus Ratio values even more useful.
The new calc_ratio can read several different values from various entities, including health, speed, armed-status, sneaking-status (under development), and on watcher entities, count.
For breakable and pushable entities,
For monsters and NPCs,
For players (singleplayer/multiplayer),
For watcher_count entities,
By changing the skin, body, and button key/values on a calc_ratio, you can access these different modes according to the table below:
breakable/pushable | monsters | players | watcher_count | |
0 | health/maxhealth | health/maxhealth | health/maxhealth | current count (absolute) |
1 | - | speed (absolute) | speed (absolute) | current count/comparison number |
2 | - | - | isSneaking (not yet implemented) | - |
3 | - | - | hasWeapons | - |
For example, if you entered 3 in the 'Ratio to use for basis' (skin) field on a calc_ratio entity, and the 'Based on ratio' value targetted *player, then depending on whether or not the player was armed, the value returned would be '1' or '0'. In your FGD there may be descriptions that save you from relying on this chart.
Created September 04, 2004 for SOHL v1.4