Myval5773 3 сар өмнө
parent
commit
74a3a5a6e0

+ 0 - 19
INDPRO/Game/Silent Specter/SilentSpecter/project/prefabs/actors/player.gbsres

@@ -1,19 +0,0 @@
-{
-  "_resourceType": "actorPrefab",
-  "id": "b876a2f9-722d-4d69-9552-bdc79f090c17",
-  "name": "Player",
-  "frame": 0,
-  "animate": false,
-  "spriteSheetId": "6ae2f141-7f1a-4ec8-af30-445db4e3ebac",
-  "moveSpeed": 1,
-  "animSpeed": 15,
-  "paletteId": "",
-  "persistent": false,
-  "collisionGroup": "",
-  "script": [],
-  "startScript": [],
-  "updateScript": [],
-  "hit1Script": [],
-  "hit2Script": [],
-  "hit3Script": []
-}

+ 62 - 0
INDPRO/Game/Silent Specter/SilentSpecter/project/prefabs/actors/playeractor.gbsres

@@ -0,0 +1,62 @@
+{
+  "_resourceType": "actorPrefab",
+  "id": "074db151-6446-4cb1-bcdb-2bb10f0f5f76",
+  "name": "PlayerActor",
+  "frame": 0,
+  "animate": false,
+  "spriteSheetId": "835fee3e-5a1d-47ed-be2d-5f060686178a",
+  "moveSpeed": 1,
+  "animSpeed": 15,
+  "paletteId": "",
+  "persistent": true,
+  "collisionGroup": "",
+  "script": [],
+  "startScript": [],
+  "updateScript": [
+    {
+      "command": "EVENT_IF_ACTOR_DIRECTION",
+      "args": {
+        "actorId": "player",
+        "direction": {
+          "type": "direction",
+          "value": "left"
+        },
+        "__collapseElse": false,
+        "__collapse": false
+      },
+      "children": {
+        "true": [
+          {
+            "command": "EVENT_SET_VALUE",
+            "args": {
+              "variable": "1",
+              "value": {
+                "type": "number",
+                "value": 0
+              },
+              "__collapse": true
+            },
+            "id": "4b03d505-a401-4868-af15-0fbb31987659"
+          }
+        ],
+        "false": [
+          {
+            "command": "EVENT_SET_VALUE",
+            "args": {
+              "variable": "1",
+              "value": {
+                "type": "number",
+                "value": 1
+              }
+            },
+            "id": "c6ce7b59-9990-42d5-ae35-5726765121f0"
+          }
+        ]
+      },
+      "id": "4a3a687c-cb4a-4cf2-926e-5ab8566d6554"
+    }
+  ],
+  "hit1Script": [],
+  "hit2Script": [],
+  "hit3Script": []
+}

+ 233 - 76
INDPRO/Game/Silent Specter/SilentSpecter/project/prefabs/actors/scaredghost.gbsres

@@ -8,79 +8,121 @@
   "moveSpeed": 0.5,
   "animSpeed": 255,
   "paletteId": "",
-  "persistent": true,
+  "persistent": false,
   "collisionGroup": "1",
   "script": [],
   "startScript": [],
   "updateScript": [
     {
-      "command": "EVENT_IF_ACTOR_DIRECTION",
+      "command": "EVENT_INC_VALUE",
       "args": {
-        "actorId": "$self$",
-        "direction": {
-          "type": "direction",
-          "value": "left"
+        "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": false
+        "__collapseElse": true,
+        "__collapse": false,
+        "__comment": true
       },
       "children": {
         "true": [
           {
-            "command": "EVENT_IF_ACTOR_DIRECTION",
+            "command": "EVENT_SET_VALUE",
             "args": {
-              "actorId": "player",
-              "direction": {
-                "type": "direction",
-                "value": "right"
-              },
-              "__collapseElse": false,
-              "__collapse": true
-            },
-            "children": {
-              "true": [
-                {
-                  "command": "EVENT_ACTOR_PUSH",
-                  "args": {
-                    "continue": true,
-                    "__collapse": false
-                  },
-                  "id": "4232b47f-1516-4d50-ab3d-a3dc4dddd90c"
-                }
-              ],
-              "false": [
-                {
-                  "command": "EVENT_ACTOR_MOVE_TO",
-                  "args": {
-                    "actorId": "$self$",
-                    "x": {
-                      "type": "property",
-                      "target": "player",
-                      "property": "xpos"
-                    },
-                    "y": {
-                      "type": "property",
-                      "target": "player",
-                      "property": "ypos"
-                    },
-                    "moveType": "horizontal",
-                    "useCollisions": true,
-                    "__collapse": true
-                  },
-                  "id": "755b6143-ebb8-44a8-89ea-7f55bbc1dc7c"
-                }
-              ]
+              "variable": "L0",
+              "value": {
+                "type": "number",
+                "value": 0
+              }
             },
-            "id": "f32e07bf-ee81-4801-920d-31d42e52c838"
+            "id": "358c00e3-7553-4b9a-9aa8-51454436d4b2"
           }
         ],
-        "false": [
+        "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_IF_ACTOR_DIRECTION",
+            "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": {
-              "actorId": "player",
-              "direction": {
-                "type": "direction",
-                "value": "left"
+              "condition": {
+                "type": "eq",
+                "valueA": {
+                  "type": "variable",
+                  "value": "1"
+                },
+                "valueB": {
+                  "type": "number",
+                  "value": 1
+                }
               },
               "__collapseElse": false,
               "__collapse": false
@@ -88,40 +130,155 @@
             "children": {
               "true": [
                 {
-                  "command": "EVENT_ACTOR_PUSH",
+                  "command": "EVENT_IF",
                   "args": {
-                    "continue": true
+                    "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": "1a2ee7f5-d155-4206-bbb8-65b3191986c6"
+                  "id": "4c1b2cec-0f74-48dc-a84c-e3a32a991f51"
                 }
               ],
               "false": [
                 {
-                  "command": "EVENT_ACTOR_MOVE_TO",
+                  "command": "EVENT_IF",
                   "args": {
-                    "actorId": "$self$",
-                    "x": {
-                      "type": "property",
-                      "target": "player",
-                      "property": "xpos"
-                    },
-                    "y": {
-                      "type": "property",
-                      "target": "player",
-                      "property": "ypos"
+                    "condition": {
+                      "type": "gt",
+                      "valueA": {
+                        "type": "property",
+                        "target": "player",
+                        "property": "pxpos"
+                      },
+                      "valueB": {
+                        "type": "property",
+                        "target": "$self$",
+                        "property": "pxpos"
+                      }
                     },
-                    "moveType": "horizontal",
-                    "useCollisions": true
+                    "__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": "8734042c-7911-4290-8f06-5c230b12b3ad"
+                  "id": "c2885866-d3ed-4cc1-8bc3-ceececbb23a1"
                 }
               ]
             },
-            "id": "d8ea875a-f010-46b7-ba05-3433eaf6debc"
+            "id": "f9212125-f118-419b-b8e3-adf44e6490da"
           }
-        ]
+        ],
+        "false": []
       },
-      "id": "2c237aed-fdfe-432d-b536-ff84d56b4500"
+      "id": "c2f0cdcc-f9e9-49bf-8d9c-f62a542f1eb7"
     }
   ],
   "hit1Script": [],

+ 13 - 6
INDPRO/Game/Silent Specter/SilentSpecter/project/scenes/maps/house/actors/actor.gbsres

@@ -1,11 +1,11 @@
 {
   "_resourceType": "actor",
-  "id": "7f696464-976c-4b57-bc61-0fa10d3e1807",
+  "id": "0cd5c97d-3d16-4095-8ca7-36a60bdd19e2",
   "name": "",
   "frame": 0,
   "animate": false,
   "spriteSheetId": "581d34d0-9591-4e6e-a609-1d94f203b0cd",
-  "prefabId": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7",
+  "prefabId": "074db151-6446-4cb1-bcdb-2bb10f0f5f76",
   "direction": "down",
   "moveSpeed": 1,
   "animSpeed": 15,
@@ -13,15 +13,22 @@
   "isPinned": false,
   "persistent": false,
   "collisionGroup": "",
-  "prefabScriptOverrides": {},
-  "symbol": "actor_1",
+  "prefabScriptOverrides": {
+    "4a3a687c-cb4a-4cf2-926e-5ab8566d6554": {
+      "id": "4a3a687c-cb4a-4cf2-926e-5ab8566d6554",
+      "args": {
+        "__collapseElse": false
+      }
+    }
+  },
+  "symbol": "actor_2",
   "script": [],
   "startScript": [],
   "updateScript": [],
   "hit1Script": [],
   "hit2Script": [],
   "hit3Script": [],
-  "x": 26,
-  "y": 125,
+  "x": 14,
+  "y": 101,
   "_index": 1
 }

+ 25 - 6
INDPRO/Game/Silent Specter/SilentSpecter/project/scenes/maps/house/actors/actor_2.gbsres

@@ -1,27 +1,46 @@
 {
   "_resourceType": "actor",
-  "id": "7b99560b-5cd0-4b55-8a70-6ce5cf1fa6a2",
+  "id": "09ee472c-a460-4f1d-bedc-034cf674d494",
   "name": "",
   "frame": 0,
   "animate": false,
   "spriteSheetId": "581d34d0-9591-4e6e-a609-1d94f203b0cd",
-  "prefabId": "85963a72-44fc-4d3f-a363-e84d17c25b06",
-  "direction": "down",
+  "prefabId": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7",
+  "direction": "left",
   "moveSpeed": 1,
   "animSpeed": 15,
   "paletteId": "",
   "isPinned": false,
   "persistent": false,
   "collisionGroup": "",
-  "prefabScriptOverrides": {},
-  "symbol": "actor_2",
+  "prefabScriptOverrides": {
+    "c2f0cdcc-f9e9-49bf-8d9c-f62a542f1eb7": {
+      "id": "c2f0cdcc-f9e9-49bf-8d9c-f62a542f1eb7",
+      "args": {
+        "__collapseElse": false
+      }
+    },
+    "4c1b2cec-0f74-48dc-a84c-e3a32a991f51": {
+      "id": "4c1b2cec-0f74-48dc-a84c-e3a32a991f51",
+      "args": {
+        "__collapseElse": true
+      }
+    },
+    "f9212125-f118-419b-b8e3-adf44e6490da": {
+      "id": "f9212125-f118-419b-b8e3-adf44e6490da",
+      "args": {
+        "__collapseElse": false
+      }
+    }
+  },
+  "symbol": "actor_1",
   "script": [],
   "startScript": [],
   "updateScript": [],
   "hit1Script": [],
   "hit2Script": [],
   "hit3Script": [],
-  "x": 18,
+  "x": 14,
   "y": 125,
   "_index": 2
 }

+ 5 - 12
INDPRO/Game/Silent Specter/SilentSpecter/project/scenes/maps/house/scene.gbsres

@@ -24,7 +24,7 @@
         ],
         "override": true,
         "__scriptTabs": "press",
-        "__collapse": false
+        "__collapse": true
       },
       "children": {
         "true": [
@@ -74,15 +74,6 @@
       },
       "id": "7d2baba9-8adf-42de-9556-37efb9c720df"
     },
-    {
-      "command": "EVENT_ACTOR_SET_SPRITE",
-      "args": {
-        "actorId": "$self$",
-        "spriteSheetId": "6ae2f141-7f1a-4ec8-af30-445db4e3ebac",
-        "__comment": true
-      },
-      "id": "2dfeae67-36e6-4477-9274-bdfd64592420"
-    },
     {
       "command": "EVENT_SET_INPUT_SCRIPT",
       "args": {
@@ -116,7 +107,8 @@
             "id": "0"
           }
         ],
-        "__comment": true
+        "__comment": true,
+        "__collapse": false
       },
       "id": "96d33c6f-5598-451d-bf91-ff38bcdeb3b2"
     }
@@ -124,5 +116,6 @@
   "playerHit1Script": [],
   "playerHit2Script": [],
   "playerHit3Script": [],
-  "playerSpriteSheetId": "6ae2f141-7f1a-4ec8-af30-445db4e3ebac"
+  "playerSpriteSheetId": "6ae2f141-7f1a-4ec8-af30-445db4e3ebac",
+  "autoFadeEventCollapse": true
 }

+ 20 - 0
INDPRO/Game/Silent Specter/SilentSpecter/project/variables.gbsres

@@ -5,6 +5,26 @@
       "id": "0",
       "name": "bIsInvisible",
       "symbol": "var_bisinvisible"
+    },
+    {
+      "id": "1",
+      "name": "PlayerDirection",
+      "symbol": "var_playerdirection_0"
+    },
+    {
+      "id": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7__L0",
+      "name": "Tick",
+      "symbol": "var_tick"
+    },
+    {
+      "id": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7__L1",
+      "name": "_PlayerX",
+      "symbol": "var_playerx"
+    },
+    {
+      "id": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7__L2",
+      "name": "_PlayerY",
+      "symbol": "var_playery"
     }
   ]
 }