Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Life

Returns the character’s current hit points.

HP is an alias for this method.

Фактически это вызов GetHP с параметром Self. Для проверки здоровья других мобайлов используйте GetHP.

Returns 0 if the character is not connected.

Возвращает текущее количество очков здоровья персонажа.

HP — алиас для этого метода.

Фактически это вызов GetHP с параметром Self. Для проверки здоровья других мобайлов используйте GetHP.

Возвращает 0, если персонаж не подключён.

Pascal

function Life: Integer;

Python

def Life() -> int: ...

Pascal Example

begin
  AddToSystemJournal('HP: ' + IntToStr(Life) + ' / ' + IntToStr(MaxLife));
  if Life < MaxLife div 2 then
    AddToSystemJournal('Warning: below 50% health!');
end.

Python Example

AddToSystemJournal(f'HP: {Life()} / {MaxLife()}')
if Life() < MaxLife() // 2:
    AddToSystemJournal('Warning: below 50% health!')

See Also

HP, MaxLife, GetHP, Dead