Game Maker Community YoYo Games

Welcome Guest ( Log In | Register )

> Tutorials Rules

This forum is for clear and concise tutorials and well documented examples. Tutorials and examples posted here must follow the format in the pinned Rules and Guidelines.

All new topics must be approved by a moderator before they appear. Don't post twice!

 
Reply to this topicStart new topic
Smooth And Steady Healthbar, To make your healthbar seem more smooth during increase and decrease.
sigonasr
post Oct 9 2008, 02:56 AM
Post #1


GMC Member
Group Icon

Group: GMC Member
Posts: 25
Joined: 16-December 05
Member No.: 40928



  • Title: Steady Healthbar Example
  • Description:

    The goal of this example is to accomplish a smoothly decreasing healthbar.

    Most of the time when you play a game, and you lose a health, you see the healthbar
    go from a certain point directly to another point.

    This example makes smoothly decreasing healthbars instead, which can be useful in
    lots of ways to make your game graphically enhanced.
  • GM Version: GM 7
  • Registered: no
  • File Type: .gmk
  • File Size: ~38 kb
  • File Link: steady_healthbar.gmk

Additional Info
Use of the example:

-To implement this system into your game, simply merge your game with this example.
-Next you can use either the little circle player, or the bar for your own use.
-To make more things have this system, make a new object that has the parent object0_sh for anyone you
want it to use.
-Use this code to set your own health for the new object, setting the variables to your own:
CODE
event_inherited()
hp=5000
maxhp=hp
script_execute(create_steady_healthbar,hp)
-Then you can make collision events of any type of events to increase or decrease health like
the bullets in this example.

If you encounter some problems with the example, there is a mini FAQ in the help file there.

Good Luck, hope you like this example!

This post has been edited by sigonasr: Oct 10 2008, 01:56 AM
Go to the top of the page
 
+Quote Post
Astrosapien
post Oct 10 2008, 01:16 AM
Post #2


GMC Member
Group Icon

Group: GMC Member
Posts: 510
Joined: 11-September 07
Member No.: 88208



Nice example!

For implementing it into the game, do you mean to "make object0_sh the parent"?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 9th February 2010 - 04:35 PM