{ "_resourceType": "actorPrefab", "id": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7", "name": "ScaredGhost", "frame": 0, "animate": false, "spriteSheetId": "b98bf956-914f-4ee1-b828-5202d3645f05", "moveSpeed": 0.5, "animSpeed": 255, "paletteId": "", "persistent": false, "collisionGroup": "1", "script": [], "startScript": [], "updateScript": [ { "command": "EVENT_INC_VALUE", "args": { "variable": "L0", "__comment": true, "__collapse": true }, "id": "71434f2e-b817-403d-aa44-b3d333579e9f" }, { "command": "EVENT_IF", "args": { "condition": { "type": "gt", "valueA": { "type": "variable", "value": "L0" }, "valueB": { "type": "number", "value": 10 } }, "__collapseElse": true, "__collapse": false, "__comment": true }, "children": { "true": [ { "command": "EVENT_SET_VALUE", "args": { "variable": "L0", "value": { "type": "number", "value": 0 } }, "id": "358c00e3-7553-4b9a-9aa8-51454436d4b2" } ], "false": [] }, "id": "9c71cd65-6e42-483c-b005-ac2a3bca899b" }, { "command": "EVENT_IF", "args": { "condition": { "type": "ne", "valueA": { "type": "variable", "value": "L0" }, "valueB": { "type": "number", "value": 0 } }, "__collapseElse": false, "__comment": true }, "children": { "true": [ { "command": "EVENT_STOP", "args": {}, "id": "5b4c0a4e-6725-43b9-848b-e0c5f239d64d" } ], "false": [] }, "id": "fbd54610-2648-4068-878e-6a9dc18861f1" }, { "command": "EVENT_WAIT", "args": { "time": 1, "frames": 30 }, "id": "a21ed51b-4d6c-4300-9a5c-57886c410182" }, { "command": "EVENT_IF_ACTOR_DISTANCE_FROM_ACTOR", "args": { "actorId": "player", "operator": "<=", "distance": { "type": "number", "value": 10 }, "otherActorId": "$self$", "__collapseElse": true, "__collapse": false }, "children": { "true": [ { "command": "EVENT_IF", "args": { "condition": { "type": "eq", "valueA": { "type": "variable", "value": "1" }, "valueB": { "type": "number", "value": 1 } }, "__collapseElse": false, "__collapse": false }, "children": { "true": [ { "command": "EVENT_IF", "args": { "condition": { "type": "lt", "valueA": { "type": "property", "target": "player", "property": "pxpos" }, "valueB": { "type": "property", "target": "$self$", "property": "pxpos" } }, "__collapseElse": false }, "children": { "true": [ { "command": "EVENT_ACTOR_MOVE_RELATIVE", "args": { "actorId": "$self$", "x": { "type": "number", "value": 1 }, "y": { "type": "number", "value": 0 }, "moveType": "horizontal", "useCollisions": true, "__comment": true }, "id": "ddd0a62c-3fde-49c6-8ef8-bba024330df8" }, { "command": "EVENT_ACTOR_PUSH", "args": { "continue": true }, "id": "23334933-bd00-4ae1-a3b0-b2de1a33850f" } ], "false": [ { "command": "EVENT_ACTOR_MOVE_RELATIVE", "args": { "actorId": "$self$", "x": { "type": "property", "target": "player", "property": "pxpos" }, "y": { "type": "number", "value": 0 }, "moveType": "horizontal", "useCollisions": true }, "id": "e3b00e10-37df-4fa8-9e1a-42e11d23430f" } ] }, "id": "4c1b2cec-0f74-48dc-a84c-e3a32a991f51" } ], "false": [ { "command": "EVENT_IF", "args": { "condition": { "type": "gt", "valueA": { "type": "property", "target": "player", "property": "pxpos" }, "valueB": { "type": "property", "target": "$self$", "property": "pxpos" } }, "__collapseElse": false, "__collapse": false }, "children": { "true": [ { "command": "EVENT_ACTOR_MOVE_RELATIVE", "args": { "actorId": "$self$", "x": { "type": "number", "value": -1 }, "y": { "type": "number", "value": 0 }, "moveType": "horizontal", "useCollisions": true, "__comment": true, "__collapse": true }, "id": "fef06e94-31a4-4a22-a047-30ee8f8fbf2e" }, { "command": "EVENT_ACTOR_PUSH", "args": { "continue": true }, "id": "b053dbd9-c2f0-4e4a-bd9e-576a43ded6cc" } ], "false": [ { "command": "EVENT_ACTOR_MOVE_RELATIVE", "args": { "actorId": "$self$", "x": { "type": "property", "target": "player", "property": "pxpos" }, "y": { "type": "number", "value": 0 }, "moveType": "horizontal", "useCollisions": true }, "id": "d81eb6cb-a818-4781-9fef-d2a35cbf6448" } ] }, "id": "c2885866-d3ed-4cc1-8bc3-ceececbb23a1" } ] }, "id": "f9212125-f118-419b-b8e3-adf44e6490da" } ], "false": [] }, "id": "c2f0cdcc-f9e9-49bf-8d9c-f62a542f1eb7" } ], "hit1Script": [], "hit2Script": [], "hit3Script": [] }