Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [GM]Custom Game Maker Health Bar
HeroOfHyla
post Jul 6 2008, 08:55 AM
Post #1


Twirling towards freedom
Group Icon

Group: +Gold Member
Posts: 2,791
Type: Scripter
RM Skill: Advanced




Custom Game Maker Health Bar

We're going to be making a custom healthbar for gamemaker. Many people find the default bar very tacky, so I came up with a new method that is similar to health in fire emblem.

Here's the sprites we'll need for the game:

The character:


The Health Icon:


An enemy:


And a powerup:

(You can tell I didn't work very hard on the graphics)

Make objects for the hero, the enemy, the powerup, and a blank object, which I called objController

First, let's make the hero movable.

Make keyboard triggers for Up, left, down, and right.
For up, tell the object to move to a specified position, and set the y relative to -4
Use this same theory for all of the other directions (more info and different methods can be found in my Game Maker Movement Types tutorial).

Now go over to the objController, and make a Create trigger. Set the health to whatever you want. I set mine to 20.
Now make a Draw trigger. Set 2 variables (I called mine varHPx and varHPy) to the coordinates where you want the first HP icon to be drawn.
Make a repeat event with the number of times "health".
Use the Triangle icons to create a group under the repeat.
Now, use the Draw Sprite command and draw the HP icon at varHPx and varHPy.
Then, add to varHPx. I added 7, so there would be a small gap between each icon
So, it should look like this after you've done everything:


Now, go to the hero object. Make a collision with enemy trigger. Tell it to destroy the enemy and reduce health by one.
Repeat for the powerup collision, but increasing health by one.

Test it out, and it should work!



__________________________
Asexual - Arizonan - Atheist
I've got a gmail account and a yahoo mail account under this name, if you need to contact me.
You can find me on facebook too. facebook.com/heroofhyla . If you send me a friend request, tell me who you are so I don't get confused.

PlagueRPG SITE IS WORKING! (if you see "test page," hit ctrl+f5)
Latest update: New battle system demo, April 19, 2010

http://heroofhyla.deviantart.com/ ----- http://heroofhyla.livejournal.com/ ----- http://thatonecomic.smackjeeves.com
Go to the top of the page
 
+Quote Post
   
Freedom
post Jul 7 2008, 02:39 PM
Post #2


おねがいします! ぼくの なまえ わ じう
Group Icon

Group: Revolutionary
Posts: 520
Type: Mapper
RM Skill: Undisclosed




I like the Idea...I have never thought you can do that...Nice job Hero...Your both a mod and a great game maker user...


__________________________




[Show/Hide] RRR Guest Map


Guest Map Link - Guest Map

Guest Map made by Santabla



[Show/Hide] Signature


[Show/Hide] Welcoming Committee


RRR Welcoming Committee

Speed@
CJ7Edition
Kyle1234lee
Freedom

--------------------------------------

A memory from what was the good past... Haha...







Go to the top of the page
 
+Quote Post
   
HeroOfHyla
post Jul 7 2008, 03:05 PM
Post #3


Twirling towards freedom
Group Icon

Group: +Gold Member
Posts: 2,791
Type: Scripter
RM Skill: Advanced




Why thank you!

Another similar thing you could do with this is using image_xscale and making the bar longer or shorter based on health.


__________________________
Asexual - Arizonan - Atheist
I've got a gmail account and a yahoo mail account under this name, if you need to contact me.
You can find me on facebook too. facebook.com/heroofhyla . If you send me a friend request, tell me who you are so I don't get confused.

PlagueRPG SITE IS WORKING! (if you see "test page," hit ctrl+f5)
Latest update: New battle system demo, April 19, 2010

http://heroofhyla.deviantart.com/ ----- http://heroofhyla.livejournal.com/ ----- http://thatonecomic.smackjeeves.com
Go to the top of the page
 
+Quote Post
   
Freedom
post Jul 8 2008, 03:21 AM
Post #4


おねがいします! ぼくの なまえ わ じう
Group Icon

Group: Revolutionary
Posts: 520
Type: Mapper
RM Skill: Undisclosed




I see...Got anymore...I'm using game maker when I feel bored and sometimes when I feel trying to experiment with it but I'm having a hard time to do so...Anyways why not make more tutorials?


__________________________




[Show/Hide] RRR Guest Map


Guest Map Link - Guest Map

Guest Map made by Santabla



[Show/Hide] Signature


[Show/Hide] Welcoming Committee


RRR Welcoming Committee

Speed@
CJ7Edition
Kyle1234lee
Freedom

--------------------------------------

A memory from what was the good past... Haha...







Go to the top of the page
 
+Quote Post
   
HeroOfHyla
post Jul 8 2008, 09:12 AM
Post #5


Twirling towards freedom
Group Icon

Group: +Gold Member
Posts: 2,791
Type: Scripter
RM Skill: Advanced




I'm not sure what my next tutorial will be. It might be about rm style message boxes in GM.


__________________________
Asexual - Arizonan - Atheist
I've got a gmail account and a yahoo mail account under this name, if you need to contact me.
You can find me on facebook too. facebook.com/heroofhyla . If you send me a friend request, tell me who you are so I don't get confused.

PlagueRPG SITE IS WORKING! (if you see "test page," hit ctrl+f5)
Latest update: New battle system demo, April 19, 2010

http://heroofhyla.deviantart.com/ ----- http://heroofhyla.livejournal.com/ ----- http://thatonecomic.smackjeeves.com
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:

 

Lo-Fi Version Time is now: 22nd May 2013 - 11:59 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker