Page 1 of 1

can someone edit this file?

PostPosted: Sat Dec 24, 2011 10:14 pm
by raminkhan
Sorry for repeated posts but I have attached the file I need edited with a description in the gEd file so please fix my health bar thanks.

Re: can someone edit this file?

PostPosted: Sat Dec 24, 2011 10:41 pm
by skydereign
As I mentioned, you shouldn't use clones for the hp bar. That's the main reason why Hblade's fix didn't apply to your code. I made the hp bar be an actual animation, which is how almost everyone handles hp. So, in future you should tell us how you approached the problem, as well as the problem you are having. We had no idea you were trying to use clones.

Re: can someone edit this file?

PostPosted: Sat Dec 24, 2011 11:03 pm
by raminkhan
so sky was I clear this time so you guys can understand my needs? if so I would try creating templates from now to on. by the way thanks bro. merry Christmass

Re: can someone edit this file?

PostPosted: Sat Dec 24, 2011 11:07 pm
by skydereign
Well, I figured it out why you didn't understand from your previous post, so I knew what to fix this time. But, creating example ged files is a good way to get your point across if you can't do so in words. At least it allows us to see what you are trying to do, though the better you are at explaining your problems, the better you will be at fixing them.

Re: can someone edit this file?

PostPosted: Tue Jan 17, 2012 11:31 pm
by FlareTheDragon
Hi, in my game, can somebody tell me where to put this.

Re: can someone edit this file?

PostPosted: Tue Jan 17, 2012 11:47 pm
by skydereign
All it is is an hp bar that increases over time. Its code is in its draw event, and it uses an animation to display hp. So you just put it into your game, it isn't a matter of where you put it.

Re: can someone edit this file?

PostPosted: Wed Jan 18, 2012 12:29 am
by FlareTheDragon
Thanks, but I have one more question. What code do I put in the enemey to damage the health and besides the health bar, do I put in anything else. If so to any, can you please write the code.!

Re: can someone edit this file?

PostPosted: Wed Jan 18, 2012 12:36 am
by skydereign
Asking people to write the code for you won't help you learn nearly as much as asking how something is done. There are plenty of examples of how to do hp on the forums. The player's health is held in a variable called hp. If you want to decrease the player's hp then do so. If you've looked through the basic tutorials then you should be able to do that without me giving you the code. And when you collide (or whatever causes you to lose hp) you may want to add a check to see if the player's hp is 0, otherwise there is no point in having hp.

Re: can someone edit this file?

PostPosted: Wed Jan 18, 2012 1:12 am
by FlareTheDragon
Thanks, I was just in a hurry to make a game. I new.