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][TAW]Zelda-Style Hearts
HeroOfHyla
post May 28 2009, 06:36 PM
Post #1


Twirling towards freedom
Group Icon

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




Link to GM TAW Program: http://www.rpgrevolution.com/forums/index....showtopic=31232
This demo will show you how to code a Zelda-style heart system. It allows the game designer to choose when to adjust the max number of possible hearts. It supports quarter hearts. It automatically wraps the hearts to have only 10 on a line.



Link: http://www.mediafire.com/download.php?yyaom2mimyy


__________________________
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
   
Darkblade
post May 29 2009, 08:27 AM
Post #2


Spiders, spiders everywhere! on my chair! In my hair!
Group Icon

Group: +Gold Member
Posts: 2,748
Type: None
RM Skill: Beginner




Thats really cool.
Is this what you are using for your game?
I thought you were going for HP numbers rather than hearts.


__________________________
Go to the top of the page
 
+Quote Post
   
HeroOfHyla
post May 29 2009, 05:58 PM
Post #3


Twirling towards freedom
Group Icon

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




Nah, this is just a tutorial for other people. It's not for my project.


__________________________
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
   
error_on_page
post Jun 26 2009, 07:23 AM
Post #4


King of Games
Group Icon

Group: Revolutionary
Posts: 120
Type: Developer
RM Skill: Intermediate




I'm using this in a game and it works great, except that the hearts don't stay in a view. They are locked into one position, so that when my character moves the view changes and you can't see the hearts. I was wondering: How do I change it so that their position is relative to the border of the view?


__________________________

^Thanks Gamerbird for the awesome Sig^
Go to the top of the page
 
+Quote Post
   
HeroOfHyla
post Jun 26 2009, 06:33 PM
Post #5


Twirling towards freedom
Group Icon

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




Replace the code in the draw event for objController with this:
CODE
{
    numOfFullRows = floor(maxHealth/40);
    for (i = 0; i < numOfFullRows; i+= 1)
    {
        for (k = 0; k < 10; k +=1)
        {
            draw_sprite(sprHealthBack,0,view_xview[0] + 32 + 20*k, view_yview[0] + 32 + 20*i);
        }
    }
    finalRow = (maxHealth - (numOfFullRows * 40))/4
    for (k = 0; k < finalRow; k += 1)
    {
        draw_sprite(sprHealthBack,0,view_xview[0] + 32 + 20*k, view_yview[0] + 32 + 20*numOfFullRows);
    }
    //fullHearts = floor(health/4);
    heartRows = floor(health/40);
    for (i = 0; i < heartRows; i+= 1)
    {
        for (k = 0; k < 10; k +=1)
        {
            draw_sprite(sprHealthIcon,0,view_xview[0] + 32 + 20*k, view_yview[0] + 32 + 20*i);
        }
    }
    finalHeartRow = (health - (heartRows * 40))/4
    for (k = 0; k < finalHeartRow -1; k += 1)
    {
        draw_sprite(sprHealthIcon,0,view_xview[0] + 32 + 20*k, view_yview[0] +32 + 20*heartRows);
    }
    if (finalHeartRow != 0)
    {
    draw_sprite(sprHealthIcon,health mod 4,view_xview[0] +32 + 20*k,view_yview[0] +32+20*heartRows);
    }
}

I basically just added "view_xview[0] + " in front of all the x coordinates and "view_yview[0] + " in front of all the y coordinates.


__________________________
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: 19th May 2013 - 05:12 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker