The Daily Click ::. Forums ::. Klik Coding Help ::. Health bars.
 

Post Reply  Post Oekaki 
 

Posted By Message

Agent_K64



Registered
  17/03/2003
Points
  69
14th August, 2004 at 00:05:45 -

Allright, I was wondering about which methods I could use to make health bars. I know that I can use the counter object for this, but I'm looking for other, preferably better (more efficient?) ways. I need the health bars to be bound to the objects they display the health for, kind of like in strategy games. This is for a multiplayer game, if that makes any difference.

Thanks!

 
Evil omg~!

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
14th August, 2004 at 00:27:12 -

Well counters are fine, and if you want health bars try changing the counter from a number to a bar.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Mr Icekirby



Registered
  18/12/2003
Points
  846
14th August, 2004 at 09:34:04 -

just set the bars x to player X and the counter y to player Y + 10, so it ends up under the player and repeat for other things

 
Mr Icekirby says so!
OBEY ME!

Agent_K64



Registered
  17/03/2003
Points
  69
14th August, 2004 at 13:21:52 -

Like I've stated before, I know that I can use a counter object for this purpose. I'm just wondering if there are more options.

 
Evil omg~!

Kirby Smith

Resident Slacker

Registered
  18/05/2003
Points
  479

VIP Member360 OwnerWii OwnerThe Cake is a Lie
14th August, 2004 at 14:01:01 -

You could always store the players health in an alterable value, then display that health value using an active object that follows the player (change the animation based on the value). This would let you do cool shiz like making a heart pulse that animates at a different rate based on the players health or something. . .

 
XBL Gamertag: Rampant Mjolnir

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
14th August, 2004 at 14:36:53 -

bloody clothing works well.

 
Craps, I'm an old man!

Agent_K64



Registered
  17/03/2003
Points
  69
14th August, 2004 at 14:51:59 -

Ah cr--, I just remembered that counters do not have alterable values! This means I cannot use them for health bars in multiplayer games, because I won't be able to keep track of them...
I guess I could use an active object's animation, but I don't need anything fancy; I just need a bar that could be trackable by alterable value.

 
Evil omg~!

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
14th August, 2004 at 15:11:31 -

As long as you've got the same amount of health bars as you have players to display them over, MMF will sort it all out and put a health bar above each player. Just keep setting the value and repositioning them over players in an Always event.

 
n/a

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
14th August, 2004 at 18:20:42 -

When I read the title I thought you were talking about Power Bars or something...


 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
14th August, 2004 at 19:54:28 -

Yeah, same with Laz.

 
n/a

_rydin



Registered
  06/06/2004
Points
  317
15th August, 2004 at 02:59:40 -

You could use an active object, and instead of an animation for each incriment, you could just change the direction of the object.

 
"Computers in the future may perhaps only weigh 1.5 tons."
-Popular Mechanics, forecasting the development of computer technology, 1949

Agent_K64



Registered
  17/03/2003
Points
  69
15th August, 2004 at 12:08:18 -

"Just keep setting the value and repositioning them over players in an Always event." Will this cause a performance decrease? You see, I'm cautious because I'm developing this game on a P4@2.66 computer, so even crappy code will probably run well... but I may find "pleasant surprises" when people with slower machines try to play the game.

Oh, speaking of which... why is a MMF application taking up 90% of my CPU power...? *_* I mean, it’s not a very slow CPU, you know...

 
Evil omg~!

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
16th August, 2004 at 13:59:32 -

Considering how slowly klik events cycle (without loops), there's not much you can do, event-wise, that will really affect the speed. Sensibly, anyway.

 
n/a

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
16th August, 2004 at 18:55:47 -

MMF applications are rather processor-greedy - they take up as much of its time as possible so that nothing can interrupt them or slow them down. That's why the program is taking up so much processor time, it's the same on all computers regardless of their power.

 
http://www.davidn.co.nr - Games, music, living in America

jast



Registered
  03/01/2014 01:12:19
Points
  186
17th August, 2004 at 09:36:16 -

"Considering how slowly klik events cycle (without loops), there's not much you can do, event-wise, that will really affect the speed. Sensibly, anyway."

Huh? You mean you can do what you want, the game won't slow down as long as you don't use any fast loops? Ever tried parallaxing backgrounds?

 
n/a

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
17th August, 2004 at 12:39:38 -

As I said, event-wise. Not big fucking active objects having a seizure, that's a frame editor thing.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click