[SOLVED]

M

Melissa.

Guest
I want to have two scores in one game, so I created this code, but the score doesn't add up and stays at 0. What did I do wrong?

This is what I have
obj_gamecontroller, room Start:
global.score1 = 0;
global.score2 = 0;

obj_controller1 , Draw:
draw_set_color (c_white);
draw_text(540,40, 'Punten: ' + string(global.score1))

obj_controller2 , Draw:
draw_set_color (c_white);
draw_text(540,40, 'Punten: ' + string(global.score2))

obj_ball collide with obj_border1:
global.score2 += 1;
room_restart();

obj_ball collide with obj_border2:
global.score1 += 1;
room_restart();
 
Top