我想创建一个像 MOTHER 系列一样的里程表寿命计,有人知道我能做什么吗?
我已经尝试在谷歌上搜索,我尝试自己做,但我唯一得到的是一个糟糕的仪表,它甚至没有显示正确的健康量(顺便说一句,这是针对动作 RPG 的。
我只想在我的项目中重新创建母亲游戏中的里程表系统,(请)有人告诉我如何做到这一点/或给我一些提示吗?
在 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.