Newer
Older
System38 / project / scripts / turnip_collisions.gbsres
{
  "_resourceType": "script",
  "id": "44fff45e-a915-4eb9-915b-647ee134d64e",
  "name": "Turnip Collisions",
  "symbol": "script_turnip_collisions",
  "description": "Handle player jumping on turnips or being hurt",
  "variables": {
    "V0": {
      "id": "V0",
      "name": "Defeated",
      "passByReference": true
    },
    "V1": {
      "id": "V1",
      "name": "Turnip Counter",
      "passByReference": true
    }
  },
  "actors": {
    "0": {
      "id": "0",
      "name": "Turnip"
    }
  },
  "script": [
    {
      "id": "8181c726-3c2f-4bbc-a232-9473d6b92ed4",
      "command": "EVENT_IF_ACTOR_RELATIVE_TO_ACTOR",
      "args": {
        "actorId": "player",
        "operation": "up",
        "otherActorId": "0",
        "__collapseElse": false
      },
      "children": {
        "true": [
          {
            "id": "a89195c2-b1c5-4e47-9ecb-a740b7196762",
            "command": "EVENT_SET_VALUE",
            "args": {
              "variable": "V0",
              "value": {
                "type": "true"
              }
            }
          },
          {
            "id": "51154d0c-3818-4efd-a671-f69ff65b9eeb",
            "command": "EVENT_DEC_VALUE",
            "args": {
              "variable": "V1"
            }
          },
          {
            "id": "eec9808a-e650-4b34-95b4-b342f138f3a4",
            "command": "EVENT_ACTOR_COLLISIONS_DISABLE",
            "args": {
              "actorId": "0"
            }
          },
          {
            "id": "39613c67-c66c-4db9-81cf-b1b42e2362f4",
            "command": "EVENT_ACTOR_STOP_UPDATE",
            "args": {
              "actorId": "0"
            }
          },
          {
            "id": "95283d47-0edd-4785-83d1-6838b09ae805",
            "command": "EVENT_ACTOR_SET_SPRITE",
            "args": {
              "actorId": "0",
              "spriteSheetId": "6f1e5757-a472-4531-8a65-aee22751e917"
            }
          },
          {
            "id": "59091f48-bb65-46fd-b711-ebecbd326403",
            "command": "EVENT_PLAYER_BOUNCE",
            "args": {
              "height": "low"
            }
          },
          {
            "id": "62c64cfe-f09c-46e4-b32e-7df038ae083d",
            "command": "EVENT_WAIT",
            "args": {
              "time": 0.5
            }
          },
          {
            "id": "cec524f1-a5ac-4c1a-bdeb-314b15a508b1",
            "command": "EVENT_ACTOR_DEACTIVATE",
            "args": {
              "actorId": "0"
            }
          }
        ],
        "false": [
          {
            "id": "908101d8-4136-4fdb-8f0a-41ec944dea79",
            "command": "EVENT_ACTOR_SET_POSITION",
            "args": {
              "actorId": "player",
              "x": {
                "type": "number",
                "value": 52
              },
              "y": {
                "type": "number",
                "value": 13
              }
            }
          },
          {
            "id": "bb032da2-cd1f-4d06-922b-6d7c90f29fbf",
            "command": "EVENT_CAMERA_SHAKE",
            "args": {
              "time": 0.5,
              "magnitude": {
                "type": "number",
                "value": 5
              }
            }
          }
        ]
      }
    }
  ]
}