Barebones function 130
Contents
Barebones function 130
Function 130: 130:
- Function 130 = Part of HP and TP monitoring.
HP and TP monitoring
This is needed to help determine cretin conditions you may want to place in your quest that would use the players HP and TP values. Things such as players death count or overall all players HP and TP or just to inform the players in real time how much HP and TP everyone else has at the moment. This monitors current HP and TP levels and maximum HP and TP levels. It can also be used as an anti cheating device, since all the clients have to report to the quest there actual HP and TP values. This is also helpful because you can actually see how much HP and TP your teammates have.
Barebones function 130 = Function 130 is threaded when the quest begins in Barebones function 10500, all players store their current HP and TP values in register 40 through register 43, The players are then told to take their HP and TP values in register 40 through register 43 and sync_register them up to all players in new registers to be used as what will be displayed and reported to everyone, the function jumps back on it's self to update the monitored values.
Barebones function 131 = Function 131 tells the red gem player to sync_register their HP and TP values to all clients.
Barebones function 132 = Function 132 tells the green gem player to sync_register their HP and TP values to all clients.
Barebones function 133 = Function 133 tells the yellow gem player to sync_register their HP and TP values to all clients.
Barebones function 134 = Function 134 tells the blue gem player to sync_register their HP and TP values to all clients.
Barebones function 135 = Function 135 scrolls a text message informing about the current HP and TP values of all players, and the K.O. counter. (This function has to be turned on at the quest makers decision.)
Barebones function 136 = Function 136 waits for the scrolling text message in function 135 to finish and when it does scroll the message again for an update. (This function may be edited by the quest maker to work at a timed interval for not so constant updates.)
Use
Function 130 is threaded when the quest begins in Barebones function 10500, all players store their current HP and TP values in register 40 through register 43, The players are then told to take their HP and TP values in register 40 through register 43 and sync_register them up to all players in new registers to be used as what will be displayed and reported to everyone, the function jumps back on it's self to update the monitored values.
How the function appears in the script
130: sync //Waits 1 frame.
get_player_hp R250, R40 //All players store their current HP and TP values in register 40 through register 43.
switch_call R250, 4:131:132:133:134 //Based on the slot the player is in tells which registers to send their HP and TP information to for all clients see.
jmp 130 //Jumps to function 130.
Also see
sync, get_player_hp, switch_call, jmp, thread,
Barebones function 131, Barebones function 132, Barebones function 133,
Barebones function 134, Barebones function 135, Barebones function 136,