Files
PyG2O/python/docs/defaultEvents/player/onPlayerChangeMaxHealth.md
2025-01-25 00:02:52 +03:00

747 B

event onPlayerChangeMaxHealth

This event is triggered when player maximum health changes.

Original: onPlayerChangeMaxHealth

Parameters

  • dict kwargs:
    • int playerid: the id of the player whose maxium health points gets changed.
    • int oldMaxHP: the previous maximum health points of the player.
    • int newMaxHP: the new maximum health points of the player.

Usage

import g2o
        
@g2o.event('onPlayerChangeMaxHealth')
def onChangeMaxHealth(**kwargs):
    print(f'Player {kwargs['playerid']} changed maximum health: {kwargs['oldMaxHP']} -> {kwargs['newMaxHP']}')