[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