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 / Making Stanima bar

Author
Message
Trev
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 10th Apr 2004 18:46
Im making a fps(in dbpro) and I have made it so the player can move at two differnt speeds running/walking. What i have now is the run variable goes up as the player is not running up to 200 and when it hits 0 they need to wait a second or two for it to go up. What my question is, is how do i get this run variable to be represented by a bar wich goes up and down as the variable does.(code is attached)

PS: evry1 can use the code i allready have if they want to

Trevor Somerville
Trev
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 10th Apr 2004 18:58 Edited at: 10th Apr 2004 19:03
fergot to copy the loop at the end just pretend its thier

Trevor Somerville
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Apr 2004 19:28
You could use a sprite of a colored rectangle, and then scale it according to however much stamina you have. So if you have 50% stamina (which is 100 in the variable) you'd use something like:

scale sprite spriteNo, (run/2), 100, 100

Its not a bug, its a feature!
Trev
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 10th Apr 2004 19:43 Edited at: 10th Apr 2004 19:45
it works but it was size sprite, thanks for the help

Trevor Somerville
flibX0r
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Western Australia
Posted: 10th Apr 2004 19:48 Edited at: 10th Apr 2004 19:49
Use this.

It basically just draw a box the same size as the run variable, but if you did it wih an animation or something then you coul just change the frame numbers or something

EDIT: Damn, i was busy, i'm so slow

Current Project: Interactive DBPro Showcase Example
Project Status: Game Engine 90%
http://www.w3th.tk <-- Soon to have some content
Trev
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Canada, Ontario
Posted: 10th Apr 2004 19:58
lol yours worked to and it made all my text go neon green wich was cool lol both your ways work perfectly ty for the help (cool color)

Trevor Somerville

Login to post a reply

Server time is: 2024-09-22 04:40:29
Your offset time is: 2024-09-22 04:40:29