• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[RESOLVED] Keep a custom draw variable when we change room?

Arlan64

Member
Hello world,

I created a new variable named "emeraldCount" but I want this variable not equals 0 when we change room...

I want to keep the variable for all rooms, like the score variable for example if you want.

I give you the codes:

obj_drawScore >> Draw Event
Code:
{draw_text(view_xview[0]+10,view_yview[0]+114,"Émeraudes: " + string(emeraldCount))}
Blooby (obj_player) >> Collision Event With obj_emerald
Code:
with other {instance_destroy();}
with (obj_drawScore) {emeraldCount = emeraldCount + 1;}
sound_play(Emerald);
I have "Émeraudes: 0" and "Émeraudes: 1" when I'm in level 2 and I've one emerald... and idk how to seperate that.

Your help will be welcome!
 
Top