J
Jackdahack
Guest
Hi,
we are currently designing a small browser game for our company. For this we use GameMaker Studio. We have created a login script so far. After verifying that password and username are correct, the script should create a player object in a predefined space. That´s the Code for that:
room_goto(rm_Spawn);
instance_create_layer(position[0], position[1], "Player", obj_Player);
Now the problem. When we run the project from GML by default, everything works fine. You can register and then log in and an obj_player appears in the room. With the cursor keys the figure jumps 30pixel in the corresponding direction.
But as soon as we put everything on HTML5, the player object disappears as soon as a cursor key is pressed. We once hung an alarm on the obj_player, which also runs. So it seems to be there, but we do not see it anymore
Another notoriety: If we place obj_player in advance in GML in the room, everything works fine. So we suspect that it has something to do with the instance_create_layer.
Any idea ??? Or is there an alternative method .
we are currently designing a small browser game for our company. For this we use GameMaker Studio. We have created a login script so far. After verifying that password and username are correct, the script should create a player object in a predefined space. That´s the Code for that:
room_goto(rm_Spawn);
instance_create_layer(position[0], position[1], "Player", obj_Player);
Now the problem. When we run the project from GML by default, everything works fine. You can register and then log in and an obj_player appears in the room. With the cursor keys the figure jumps 30pixel in the corresponding direction.
But as soon as we put everything on HTML5, the player object disappears as soon as a cursor key is pressed. We once hung an alarm on the obj_player, which also runs. So it seems to be there, but we do not see it anymore
Another notoriety: If we place obj_player in advance in GML in the room, everything works fine. So we suspect that it has something to do with the instance_create_layer.
Any idea ??? Or is there an alternative method .