iterami/Docs.htm/common HTM Repos/webgl.js/webgl_stat_modify(args)
- Modifies or sets a character/entity property.
- Creates the stat if it does not exist and the "has" arg is false.
- The optional "round" arg can be an integer to round the modified stat to a specific number of decimal places using core_round(args).
- Character "life" property handles character death when life<=0, such as from webgl_character_die(id):
- Life is set to 0.
- If the character has more than 0 lives, then 1 is lost.
- If the character does not have 0 lives remaining, then their life is set to max and they respawn via webgl_character_spawn(id).
- Modifying "vertex-colors" randomizes colors.
- Calls optional repo-specific repo_stat_modify(args) function with the same args.
| has
| true
| boolean
|
| round
| false
| boolean
|
| set
| false
| boolean
|
| stat
|
| string
|
| target
|
| character/entity object
|
| value
| 1
| number
|