Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DBP: Health Bar tutorial using Stats (for RPG nuts.)

Author
Message
Lord FireFox
19
Years of Service
User Offline
Joined: 10th Oct 2004
Location:
Posted: 1st Mar 2005 05:27 Edited at: 1st Mar 2005 07:22
I took Mike's Health Bar tutorial and modified it heavily so you can calculate your players Health based on two stats: STR and DEX.
It took me awhile to figure things out on my own but I got the basic jist of it after constant and endless fiddling with variables.

The result is the code you see below:



Not the best method probably but it was the easiest..at least for me.

Edit: terribly sorry folks I forgot to put parenthisis around the calculation in the if statement:

if ST_STR+1
H = (ST_STR+ST_DEX)/2
endif

is what it should be, terribly sorry.

Login to post a reply

Server time is: 2024-09-23 13:21:17
Your offset time is: 2024-09-23 13:21:17