B
Bhreno
Guest
I am currently using this code to do this (in step event obj_game):
The problem is that every time I move to the next level, this code ends up being counted again from the beginning and life ends up multiplying from room to room.
In game start code (in obj_game):
How do I solve this?
Note: The object in question that houses the code cannot be persistent!
Code:
// "total_score" is a var of the total score;
// "score_live" is the var of the score needed to make a live;
// "lives" is the var of the lives;
if (total_score > score_live * 1000)
{
score_live = score_live + 1;
lives = lives + 1;
}
In game start code (in obj_game):
Code:
score_live = 1;
lives = 5;
Note: The object in question that houses the code cannot be persistent!