From dbcf8c9c915f86529f6f15f40360a1f53fdb4525 Mon Sep 17 00:00:00 2001 From: rick Date: Sun, 6 Dec 2020 19:39:22 +0100 Subject: [PATCH] Ajout reset salle quand joueur touche trou --- objects/oTrou/Collision_oPlayer.gml | 2 ++ objects/oTrou/oTrou.yy | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 objects/oTrou/Collision_oPlayer.gml diff --git a/objects/oTrou/Collision_oPlayer.gml b/objects/oTrou/Collision_oPlayer.gml new file mode 100644 index 0000000..2ca09de --- /dev/null +++ b/objects/oTrou/Collision_oPlayer.gml @@ -0,0 +1,2 @@ +hit (self, other, 10); +room_goto(asset_get_index("r" + string(oGame.tableau[oGame.posX, oGame.posY]))); \ No newline at end of file diff --git a/objects/oTrou/oTrou.yy b/objects/oTrou/oTrou.yy index 98c872e..7ddf665 100644 --- a/objects/oTrou/oTrou.yy +++ b/objects/oTrou/oTrou.yy @@ -1,7 +1,10 @@ { - "spriteId": null, + "spriteId": { + "name": "sTrouDetect", + "path": "sprites/sTrouDetect/sTrouDetect.yy", + }, "solid": false, - "visible": true, + "visible": false, "spriteMaskId": null, "persistent": false, "parentObjectId": null, @@ -17,7 +20,9 @@ "physicsStartAwake": true, "physicsKinematic": false, "physicsShapePoints": [], - "eventList": [], + "eventList": [ + {"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"oPlayer","path":"objects/oPlayer/oPlayer.yy",},"parent":{"name":"oTrou","path":"objects/oTrou/oTrou.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",}, + ], "properties": [], "overriddenProperties": [], "parent": {