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.

Author
Message
Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 11th Jun 2012 00:19
Is there anyway like in the Basic of the past to draw a filled box in my program that you can make any size like a block graph chart would use.
Marl
13
Years of Service
User Offline
Joined: 19th Nov 2011
Location: Bradford, UK
Posted: 11th Jun 2012 00:28
A Sprite without an image is a filled box, you can make them any size


Use one for each box, or reuse the same one with drawSprite()

Would that do or do you want outlines?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Jun 2012 01:22
You can also use SetSpriteColor command to set the color you want.

The three commands together give you a drawbox, you could do a function like this:


Cheers,
Ancient Lady
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 11th Jun 2012 02:22
oops, thanks guys, I didn't know I can create sprite with imageno=0.

Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 11th Jun 2012 14:31
Thanks guys wil try when I get home from work, basically its for a stats page where I have certain variables for SPEED, RELIABILITY, EXPERIENCE etc so rather then just have a number out of 10 next to it I want a coloured box that extends to the length of the variable too (seen it on lots of games).
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 11th Jun 2012 15:17 Edited at: 11th Jun 2012 15:18
Doveyy04, you'll be best with setting bar's max width instead of just setting it's width to certain number.
Say, you want a max. width of 200.



That'll work.

Follow me on twitter! @MotionStruct
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Jun 2012 20:59
Cool addition the the idea, kamac.

Cheers,
Ancient Lady
Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 11th Jun 2012 21:47
You can also make the health bar change color from green to yellow to red, as health decline.

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
MarcoBruti
13
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 12th Jun 2012 17:19
very cool suggestion, I'll use it in my new platform game...

Login to post a reply

Server time is: 2024-11-23 15:10:14
Your offset time is: 2024-11-23 15:10:14