TAB - thinBasic Adventure Builder
Would you like to react to this message? Create an account in a few clicks or log in to continue.

TAB - thinBasic Adventure Builder

T.A.B. is an interactive fiction/text adventure program for Windows and made with thinBasic.
 
HomeLatest imagesSearchRegisterLog in
Latest topics
» Happy New Year 2024!
Health Stats I_icon_minitimeSun Dec 31, 2023 4:04 pm by catventure

» TAB Version 71
Health Stats I_icon_minitimeMon Aug 21, 2023 12:17 pm by catventure

» TAB Version 70
Health Stats I_icon_minitimeSun Oct 02, 2022 1:49 pm by catventure

» TAB Version 70
Health Stats I_icon_minitimeFri Sep 30, 2022 10:23 pm by catventure

» TAB Version 70
Health Stats I_icon_minitimeMon May 23, 2022 4:08 pm by catventure

» TAB Version 70
Health Stats I_icon_minitimeSat Apr 30, 2022 11:15 am by catventure

» TAB Version 70
Health Stats I_icon_minitimeSat Apr 23, 2022 2:32 pm by catventure

» TAB Version 68 Update
Health Stats I_icon_minitimeTue Mar 15, 2022 4:18 pm by catventure

» TAB Version 68 Update
Health Stats I_icon_minitimeFri Mar 11, 2022 8:47 pm by catventure


Share | 
 

 Health Stats

View previous topic View next topic Go down 
AuthorMessage
ffixer
Novice Adventurer
ffixer

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

Health Stats Empty
PostSubject: Health Stats   Health Stats I_icon_minitimeWed 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
http://www.clonewars.blog.hu
catventure
Admin Adventurer
catventure

Male
Number of posts : 404
Age : 71
Location : UK
Humor : Enjoys a laugh!
Adventure Points : 77
Registration date : 2008-06-08

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

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.
Back to top Go down
https://adventure.forumotion.com
 

Health Stats

View previous topic View next topic Back to top 
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: