TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
HomeFAQSearchUsergroupsRegisterLog in
Latest topics
» TAB Version 67 Available
Yesterday at 5:01 pm by catventure

» TAB Version 66 Available
Mon Sep 26, 2016 12:02 pm by catventure

» TAB Version 65 Available
Mon Feb 23, 2015 12:04 pm by catventure

» Incubation pt 1
Wed Apr 24, 2013 9:24 am by Kabrinski

» Charecter movements - doors
Wed Mar 20, 2013 2:55 pm by garethfx

» Member feedback on game planning
Sun Mar 03, 2013 1:47 pm by garethfx

» Still alive - just!
Thu Feb 28, 2013 11:34 am by catventure

» TAB 64 crashes ...
Mon Aug 20, 2012 11:31 am by acko

» Idea on addition to object being container
Sat Aug 18, 2012 3:49 pm by catventure

Share | 

 Health Stats

View previous topic View next topic Go down 
Novice Adventurer

Number of posts : 6
Age : 22
Location : Hungary
Adventure Points : 1
Registration date : 2010-08-31

PostSubject: Health Stats   Wed Sep 01, 2010 4:31 pm

How can I set health? It's similar to score but it's start with 100, and ends with 0.
Back to top Go down
View user profile
Admin Adventurer

Number of posts : 377
Age : 65
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 53
Registration date : 2008-06-08

PostSubject: Re: Health Stats   Wed Sep 01, 2010 4:55 pm


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...


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...


_________________ ; Home of the TAB I.F. project.
Back to top Go down
View user profile

Health Stats

View previous topic View next topic Back to top 

 Similar topics

Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
TAB - thinBasic Adventure Builder :: TAB FORUMS :: General Forum-
Jump to: