J
Januxor
Guest
Ok so.. I made score and I put it to Persistent but its not the same when I change the room.
So.. what to do?
So.. what to do?
{
platform_collisions_step(obj_solid_bricks);
if(place_free(x,y+1)){
gravity = .5;
} else {
gravity = 0;
}
if (keyboard_check(vk_right) && place_free(x+1,y)) {
hspeed = 3;
}
if(keyboard_check(vk_left) && place_free(x-1,y)) {
hspeed = -3;
}
if(!keyboard_check(vk_left) && !keyboard_check(vk_right)) {
platform_friction(true, 1);
} else {
platform_friction(false, 1);
}
if (keyboard_check(vk_up) && !place_free(x,y+1) && place_free(x,y-1)) {
vspeed = -7;
}
}
ok I change everything to global.score I was using global.points cause it was like that in one vid but its still the same when I change the room and yes I am using global.points (score) in more than one places? is that a problem?Are you using this:
create;
create: global.points=0;
In more than one place?
Also any reason you are using:
rather than just:Code:global.points
?Code:score
No, it is not a problem, would just use score as it already has global reach, hence you can use score instead of global.score.is that a problem?
so it cant be on create event?If you save your score in the global, you don't lose it by changing rooms.
If it becomes zero again after you changed room, this means there's an object that did put it back to zero.
You're bound to find somewhere where the engine reads: global.points=0;
score += 0;