Two Event Questions

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You are showing different numbered pictures depending on how much HP the person has. What's happening is that it's showing the higher numbered picture ON TOP OF the lower numbered picture. Change them all to use the same picture number, then each time their HP changes, the picture will be replaced rather than a new one being shown on top of, or below, the existing one.
 
Last edited by a moderator:

SongQueenSaeryen

The Songstress of Harmony
Veteran
Joined
Dec 28, 2013
Messages
81
Reaction score
8
First Language
English
Primarily Uses
RMVXA
Thank you Shaz. I already figured it out.

I still need an easy way to do the save game whenever you want.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
You can have a parallel process common event that does a Conditional Branch for Key ? is being pressed. After the Branch End, add a Wait 1 Frame to avoid lag. DON'T use a loop ANYWHERE in this common event, because being parallel process, it will loop by default.
 

JareX

Veteran
Veteran
Joined
Dec 30, 2013
Messages
33
Reaction score
8
First Language
Spanish
Primarily Uses
You can also use a single image to show the hp with a lot more of "resolution".

All you have to do is change your hp to the current %

thats is set Variable A = max hp

            set variable B = current hp

                  variable C = % HP    (Calculated from the 2 above, I can explain later how to do that, but I'm at the office right now)

then show 3 images:

Image 1 = for hp bar "background" (can be a black shaped bar)

Image 2 = for the "Current Hp" (can be a red shaped bar 50, 100 or 200 pixels long)

image 3 = for the hp bar "border" (this is optional depending on which part of the screen you decide to put the image)

then set the image 1 and 3 to a fixed position (they will not move)

then set image 2 to coordenate X: variable D (Hp coord X) and coordenate Y: a fixed number along with the other images.

it works as follows:

when you have 100% hp, then image 2 is covering image 1 and surrounded by image 3. all you see is a square filled with a red tint.

if the hp drops from 100% the image is moved some pixels to the left (or to the right if you want). revealing part of the black background.

so lets say its 75%. and asuming the image is 100 pixels long then the square will be filled with the first 75 pixels with the red bar from image 2 and the next 25 pixels will be black because part of the image 1 will be revealed (because image 2 was moved 25 pixels to the left, but you must hide those behind image 3 or pass the edge of the screen).

in order to acomplish this set variable D (HP bar coord X) to the following

lets say that you want to put the hp bar on x,y = 120,80

then set variable D = 20 + Variable C (which is the % of current HP) this is valid for a hp bar 100 pixels wide., if you want to use another size you will have to tewak the numbers there

see where I am going?

Sorry I can not explain with more details or images, I'm not in my own PC and did this in a rush (hidden from boss :p )

===============================

Edit:

 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top