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.

DarkBASIC Professional Discussion / Health and Boost bars on screen

Author
Message
Sir_Herbert
12
Years of Service
User Offline
Joined: 6th Nov 2013
Location: The InterWebz
Posted: 23rd Jan 2014 19:20
I am trying to get two bars on my screen and stay there, though I am not sure where to start. I would like to have it so that the health is on the left and the boost is on the right. The health would decrease whenever I hit one of the buildings in the world. The boost would decrease when I hit the spacebar and move faster. I have tried using the make object command and scaling it but I am not sure how to get it to stay there. Thanks

zeroSlave
17
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 23rd Jan 2014 21:43
Try loading in image you would like to use for the bars and use PASTE IMAGE each sync update to put it on the screen where you'd like. It's what I use for all of my HUD and GUI needs.

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 23rd Jan 2014 23:48
Agree with zeroSlave. There are ways to use polygonal status bars if you need to, but sprites are much easier to manage. Also, if you position them based on screen width and height you won't have to worry about them showing up in the wrong spots on various resolutions.

New sig coming soon..

Login to post a reply

Server time is: 2026-07-06 10:39:38
Your offset time is: 2026-07-06 10:39:38