Get player hp

From Unofficial QEdit Wiki Guide
Jump to: navigation, search

Syntax

Syntax: get_player_hp register1, register2

  • register1 = Reserved register 250 for player slot number.
  • register2 = Start of continuous registers.

4 registers.

First register = Stores players maximum HP.

Second register = Stores players current HP.

Third register = Stores players maximum TP.

Fourth register = Stores players current TP.


Use

Used to store and monitor the players maximum HP, current HP, maximum TP, and current TP.

Example


100:     get_slotnumber R250 //Gets the players slot number and stores it in register 250.
         thread 101 //Threads function 101.
         ret 
101:     sync  //Waits 1 frame.
         get_player_hp R250, R1 //Stores the players maximum HP in register 1, current HP in register 2, maximum TP in register 3, and current TP in register 4.
         jmp 101 //Jumps to function 101.

Also see

get_slotnumber, thread, ret,

sync, jmp, reservedregisters