E
EZTALES
Guest
so i want to save my stats in gamemaker but when i restart the game even when saving it will not save th current stats (still a bit of a noob at saving so im using a drag and drop system) my game uses physics so what im doing is that when you save the game you go to a non physics room and save there but the trouble is saving stats because im only using the basic build in save system my code is down below. please help! any examples would be greatly accepted!
( PLAYER, collide event )
/// collect exp
with (other) {instance_destroy();}
with (obj_player_stats) {
expr += 1;
/// Level Up Code
if (expr >= maxexpr) {
level += 1;
expr = expr-maxexpr;
maxexpr *= 2;
}
}
(PLAYER STATS)
(create event)
/// stats
level = 1;
expr = 0;
maxexpr = 3;
(DRAW GUI EVENT)
/// draw_stats
draw_set_color(c_black);
draw_set_halign(fa_center);
draw_set_font(font_score);
draw_text(68, 33, "LEVEL: " + string(level));
Please write back
( PLAYER, collide event )
/// collect exp
with (other) {instance_destroy();}
with (obj_player_stats) {
expr += 1;
/// Level Up Code
if (expr >= maxexpr) {
level += 1;
expr = expr-maxexpr;
maxexpr *= 2;
}
}
(PLAYER STATS)
(create event)
/// stats
level = 1;
expr = 0;
maxexpr = 3;
(DRAW GUI EVENT)
/// draw_stats
draw_set_color(c_black);
draw_set_halign(fa_center);
draw_set_font(font_score);
draw_text(68, 33, "LEVEL: " + string(level));
Please write back