How can i create an odometer/rolling meter life system like in the MOTHER series in Gamemaker Studio 1.4?

294 views Asked by At

I'd like to create an odometer life meter like in the MOTHER series, anyone knows what i can do?

I've already tried to search on google, i tried it to do myself but the only thing i got is a shitty meter which doesn't even display the right amount of health (this is for an Action-RPG btw.)

I would just like to recreate the odometer system in the mother games in to my project, could (please) somebody tell me how to do that/or give me tips about it?

1

There are 1 answers

0
BusyClown On BEST ANSWER

do this in gms2:

create a control object if you still do not have it;

in create event

// @description event create
// variable lives or odometro

global.odometer = 5; // Example of player lives

in step event

// @description event step

// you create the condition to gain life
if (keyboard_check_pressed (vk_up)) // example of condition
{
    // create your actions by gaining life
    global.odometer ++;
}

// you create the condition to lose life
if (keyboard_check_pressed (vk_down)) // example of condition
{
    // create your actions by gaining life
    global.odometer -;
}

in draw event

// @description in draw event
// example of how you will show your odometro, create yours with your sprite or your odometro object

draw_set_color (c_red);
draw_text_transformed (x, y, string (global.odometer), 10,10, image_angle);

// Place the control object in the empty room and test it.