Difference between revisions of "P hpstat V3"
From Unofficial QEdit Wiki Guide
Pheonixmog (Talk | contribs) |
Pheonixmog (Talk | contribs) (→Use) |
||
Line 8: | Line 8: | ||
==Use== | ==Use== | ||
Uses a register to read a character's HP value. The register input will measure: (maximum HP / value) and output 00000000 if current HP is greater than (maximum HP / value), 00000001 if less than. | Uses a register to read a character's HP value. The register input will measure: (maximum HP / value) and output 00000000 if current HP is greater than (maximum HP / value), 00000001 if less than. | ||
+ | Note: The output of this OPCode overwrites the input in the same register. | ||
==Example== | ==Example== |
Revision as of 04:00, 20 January 2022
Contents
Syntax
Syntax: p_hpstat_v3 register, xxxxxxxx
- register = Register for op code to use.
- xxxxxxxx = xxxxxxxx player slot (0-3).
Use
Uses a register to read a character's HP value. The register input will measure: (maximum HP / value) and output 00000000 if current HP is greater than (maximum HP / value), 00000001 if less than. Note: The output of this OPCode overwrites the input in the same register.
Example
100: sync
leti R1, 00000004
p_hpstat_v3 R1, 00000000 //Player 1's current HP will be tracked until below 25% maximum HP.
jmpi_= R1, 1, 101
jmp 100
101: window_msg 'You are at low health.'
winend
ret