我如何在 Gamemaker Studio 1.4 中创建一个像 MOTHER 系列中那样的 odometer/rolling 米生命系统?

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

我想像 MOTHER 系列一样制作一个里程计寿命表,有人知道我能做什么吗?

我已经尝试在 google 上搜索过,我自己尝试过,但我唯一得到的是一个糟糕的仪表,它甚至没有显示正确的生命值(这是为了一个动作角色扮演游戏顺便说一句。)

我只想在我的项目中重新创建母游戏中的里程表系统,有人可以(请)告诉我该怎么做吗that/or给我一些提示?

在 gms2 中执行此操作:

如果还没有控制对象,请创建一个;

正在创建活动

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

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

步进事件

// @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 -;
}

抽奖活动中

// @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.