Show Heart Level on screen based on variables

DigitalWF

Veteran
Veteran
Joined
Apr 13, 2020
Messages
214
Reaction score
58
First Language
English
Primarily Uses
RMMV
Hello,my goal is to make an icon/picture show on screen/corner of dialogue box depending on a relationship level(variables) that the player has with an npc.
I have attached the example below from old harvest moon game.
So it goes like this:
Relationship level 1= Show blackheart icon
Relationship level 2=
Show purple heart,
And so on.
I've searched around and haven't found what I'm really looking for.
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,710
Reaction score
1,128
First Language
Portuguese - Br
Primarily Uses
RMMZ
You can make a parallel event or common parallel event to be running all the time with a conditional branch:
if($gamemessage.isBusy()){
// calc the relationship level then show the picture of the heart according to it}else{erase or set the picture opacity to 0}

Or you can make a conditional branch before every dialogue checking the relationship and showing the picture.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,635
Reaction score
5,116
First Language
English
Primarily Uses
RMVXA
Right. @Eliaquim's code is a very elegant way to do it because you won't need to copy (and perhaps change) your eventing into hundreds of different dialogues, but if you're a beginner, the best way to do it is to check the value of the variable before a piece of dialogue, use a Show Picture Command to display the correct heart picture (e.g. "If Ellie Relationship > 50, If Ellie Relationship < 75, Show Orange Heart, End, End"), and erase that picture after the dialogue. If you don't know how to use Variables and Conditional Branches at all, go ahead and find a tutorial to learn about them - @Andar has some good links in his signature, I think.

Finally, one other alternative is to use SumRndmDde's HUD Maker plugin, but I think this would probably be better used for something like a health bar made of hearts, rather than showing a single picture only while dialogue is being displayed. It would get the job done, but there are simpler ways to do it.
 

DigitalWF

Veteran
Veteran
Joined
Apr 13, 2020
Messages
214
Reaction score
58
First Language
English
Primarily Uses
RMMV
Thank you,your reply is very helpful. I have vision now how to make it. This is solved please close.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

On my journey of character rework: I had this character, she was meant to be just a princess that joins your party. And at long term she was just uninteresting... So I tweaked her to be a rebel agaisn't the royalty before meeting up with the party.

Quick tip for any other ametuer pixel artists! When trying to create a colour palette, enabling Antialiasing can speed up the process of creating different shades! Just place your lightest colour and your darkest colour next to each other, select both pixels, and stretch it out!
Revolutionizing the JRPG Industry: Knocking on Doors.

Take that, murderhobos.
Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.

Forum statistics

Threads
106,054
Messages
1,018,580
Members
137,843
Latest member
Betwixt000
Top