R
Ryzzax
Guest
Hi all!
So, here's my problem: In my game, I have a level-up system which depends on how much points we have (Example: if points >= 25, Level = 1) And so, I want to make an announcement for it like, "You just upgraded to Level 1 !", for example. But, the way I'm doing is:
(In the 'obj_info' instance, there is the draw to display the massage to the right place on the screen.)
The problem is that the message stays there until I level up again, to level 2. So, in the 'obj_info', I put a create event and put 'Alarm[0] = 180;' and then, in the alarm[0] I put instance_destroy(); (self, ofc).
But, still doesn't work, the message is still there. I guess this is because it's a step event, and because I'm level 1, it keeps creating the instance 'obj_info' until my level changes.
So, how should I do it? Should I put it in another event then step. Or, is there a line of code to say in the step event "Only do this action once"?
Thank you to anyone in advance that helps me out!
So, here's my problem: In my game, I have a level-up system which depends on how much points we have (Example: if points >= 25, Level = 1) And so, I want to make an announcement for it like, "You just upgraded to Level 1 !", for example. But, the way I'm doing is:
Code:
//step Event
if (global.level == 1)
{
instance_create(x,y,obj_info);
}
The problem is that the message stays there until I level up again, to level 2. So, in the 'obj_info', I put a create event and put 'Alarm[0] = 180;' and then, in the alarm[0] I put instance_destroy(); (self, ofc).
But, still doesn't work, the message is still there. I guess this is because it's a step event, and because I'm level 1, it keeps creating the instance 'obj_info' until my level changes.
So, how should I do it? Should I put it in another event then step. Or, is there a line of code to say in the step event "Only do this action once"?
Thank you to anyone in advance that helps me out!