SunQuest
           ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 27th, 2005, 01:34 AM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 5
Not sure this is CF or something else..

But on my database i have a field with their HP and MAXHP
Ie: 5/50

What I want is - a "life bar" that will be full if their HP is full.. or half if they are half dead.. ect...

I'm not sure if this is done in coldfusion, but if not can you point me in the right direction!

Reply With Quote
  #2  
Old February 27th, 2005, 08:37 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Could you not just use an image, and set the image's width by looking at the hit point ratio? So if it is at 100% the image is say 100 pixels wide. If it is at 50% it is 50 pixels wide, etc.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old February 27th, 2005, 02:23 PM
charmed0rz charmed0rz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 142 charmed0rz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 49 m 31 sec
Reputation Power: 5
That would probably work but I dont know how to even start to go about doing it. Can you show me an example?


Quote:
Originally Posted by kiteless
Could you not just use an image, and set the image's width by looking at the hit point ratio? So if it is at 100% the image is say 100 pixels wide. If it is at 50% it is 50 pixels wide, etc.

Reply With Quote
  #4  
Old March 1st, 2005, 09:44 AM
VelvettFogg VelvettFogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 34 VelvettFogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 46 sec
Reputation Power: 4
First, I'd have two fields in the table.. one for maxHP and the other for currentHP

That said, try this;

Given your example 5/50;

find the % HP remaining (in this case 10%)

set progress = %HP remaining;

load up a graphic;

<img src="blueBar.gif" height="30" width="#progress#">

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Not sure this is CF or something else..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway