Difference between revisions of "P hpstat V3"
From Unofficial QEdit Wiki Guide
Pheonixmog (Talk | contribs) (Created page with "==Syntax== ''Syntax:'' <span style='font-size:12px;font-family:courier'><span style='color:red'>p_hpstat_v3 </span>register, xxxxxxxx</span> * ''register'' = Register for op...") |
Pheonixmog (Talk | contribs) |
||
Line 15: | Line 15: | ||
<span style='color:red'> p_hpstat_v3 </span>R1, 00000000 <span style='color:orange'>//Player 1's current HP will be tracked until below 25% maximum HP.</span> | <span style='color:red'> p_hpstat_v3 </span>R1, 00000000 <span style='color:orange'>//Player 1's current HP will be tracked until below 25% maximum HP.</span> | ||
<span style='color:green'> jmpi_= </span> R1, 1, 101 | <span style='color:green'> jmpi_= </span> R1, 1, 101 | ||
− | <span style='color:green'> jmp </span> 100 | + | <span style='color:green'> jmp </span>100 |
<span style='color:blue'>101: </span><span style='color:green'>window_msg </span>'You are at low health.' | <span style='color:blue'>101: </span><span style='color:green'>window_msg </span>'You are at low health.' | ||
<span style='color:green'> winend </span> | <span style='color:green'> winend </span> |
Revision as of 03:56, 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.
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