diff --git a/objects/oGame/Create_0.gml b/objects/oGame/Create_0.gml index 6782161..68d5d18 100644 --- a/objects/oGame/Create_0.gml +++ b/objects/oGame/Create_0.gml @@ -14,6 +14,8 @@ global.difficulty = 1; global.minutes = 1; global.secondes = 20; global.transition = -1; +// global.weapon = sSwordh.image_index[0]; +global.spawn = -1; global.perdu = false; diff --git a/objects/oGame/Step_0.gml b/objects/oGame/Step_0.gml index ab53d93..1ee4562 100644 --- a/objects/oGame/Step_0.gml +++ b/objects/oGame/Step_0.gml @@ -28,6 +28,7 @@ if (global.transition != -1) { if (posX = 0) posX = 3; else posX --; break; } + global.spawn = global.transition; global.transition = -1; room_goto(asset_get_index("r" + string(tableau[posX, posY]))); } diff --git a/objects/oPlayer/Other_4.gml b/objects/oPlayer/Other_4.gml index 646da16..15391fc 100644 --- a/objects/oPlayer/Other_4.gml +++ b/objects/oPlayer/Other_4.gml @@ -1,2 +1,22 @@ -x = room_width / 2; -y = room_height / 2; \ No newline at end of file +switch (global.spawn) { + case -1 : + x = 48; + y = room_height / 2; + break; + case 2 : + x = room_width / 2; + y = 48; + break; + case 3 : + x = room_width - 48; + y = room_height / 2; + break; + case 0 : + x = room_width / 2; + y = room_height - 48; + break; + case 1 : + x = 48; + y = room_height / 2; + break; +} \ No newline at end of file diff --git a/objects/oTransition/oTransition.yy b/objects/oTransition/oTransition.yy index 529b876..ec73d30 100644 --- a/objects/oTransition/oTransition.yy +++ b/objects/oTransition/oTransition.yy @@ -4,7 +4,7 @@ "path": "sprites/sTransition/sTransition.yy", }, "solid": false, - "visible": true, + "visible": false, "spriteMaskId": null, "persistent": false, "parentObjectId": null,