ffixer,
This can be done fairly easily using the FLAGS in coding entries.
You would start off the game by reserving one of the unused flags to be used as the HEALTH flag and set to equal 100.
This is done by using the FLAG actions in a coding list entry.
Probably best to make a Script 1 entry to do it...
[start]flag69=0[acts]flag70=100#flag69=1[end]
Here I used 2 spare flags. This entry will only be done ONCE by TAB at the beginning of the game because after it has been done flag 69 will be set to 1 and thus the conditions will always fail next time TAB scans the list...
This entry effectively sets flag70 to 100 health points.
The PLAYER therefore starts off with 100 health points.
There are actions to increase/decrease flags too so you can change the value of flag70 whenever you like...
To show the health statistic info - well there are many ways to do this.
You could make a new Vocabulary Verb: /health/
then make a RESPONSE entry like:
[start]health[acts]cmessYour health stats are %flag70% out of 100 points.[end]
If the player types "health" then print a message to show the player's health points.
The embedded format code %flag70% is automatically substituted with the ACTUAL number value held by flag 70, which in this case will print:
"Your health stats are 100 out of 100 points."
Another way of displaying the health flag is like that used for Score in the window statusbar pane.
You could simply change SYSTEM MESSAGE 83 (third pane text) from:
"Score: %score% Turns: %turns%"
to read:
"Health: %flag70% Turns: %turns%"
and the health points will always be visible to the player.
I will tell you how to increase/decrease the flag70 health flag if you understand my explanation so far - but you must remember that TAB is not strictly speaking a RPG creator but primarily a text adventure maker and there is no inbuilt combat system like in other creators...
Phil.