scaredghost.gbsres 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. {
  2. "_resourceType": "actorPrefab",
  3. "id": "aa85a6c2-7d1b-4e7c-b0ff-d029b9ec31b7",
  4. "name": "ScaredGhost",
  5. "frame": 0,
  6. "animate": false,
  7. "spriteSheetId": "b98bf956-914f-4ee1-b828-5202d3645f05",
  8. "moveSpeed": 0.5,
  9. "animSpeed": 255,
  10. "paletteId": "",
  11. "persistent": false,
  12. "collisionGroup": "1",
  13. "script": [],
  14. "startScript": [],
  15. "updateScript": [
  16. {
  17. "command": "EVENT_INC_VALUE",
  18. "args": {
  19. "variable": "L0",
  20. "__comment": true,
  21. "__collapse": true
  22. },
  23. "id": "71434f2e-b817-403d-aa44-b3d333579e9f"
  24. },
  25. {
  26. "command": "EVENT_IF",
  27. "args": {
  28. "condition": {
  29. "type": "gt",
  30. "valueA": {
  31. "type": "variable",
  32. "value": "L0"
  33. },
  34. "valueB": {
  35. "type": "number",
  36. "value": 10
  37. }
  38. },
  39. "__collapseElse": true,
  40. "__collapse": false,
  41. "__comment": true
  42. },
  43. "children": {
  44. "true": [
  45. {
  46. "command": "EVENT_SET_VALUE",
  47. "args": {
  48. "variable": "L0",
  49. "value": {
  50. "type": "number",
  51. "value": 0
  52. }
  53. },
  54. "id": "358c00e3-7553-4b9a-9aa8-51454436d4b2"
  55. }
  56. ],
  57. "false": []
  58. },
  59. "id": "9c71cd65-6e42-483c-b005-ac2a3bca899b"
  60. },
  61. {
  62. "command": "EVENT_IF",
  63. "args": {
  64. "condition": {
  65. "type": "ne",
  66. "valueA": {
  67. "type": "variable",
  68. "value": "L0"
  69. },
  70. "valueB": {
  71. "type": "number",
  72. "value": 0
  73. }
  74. },
  75. "__collapseElse": false,
  76. "__comment": true
  77. },
  78. "children": {
  79. "true": [
  80. {
  81. "command": "EVENT_STOP",
  82. "args": {},
  83. "id": "5b4c0a4e-6725-43b9-848b-e0c5f239d64d"
  84. }
  85. ],
  86. "false": []
  87. },
  88. "id": "fbd54610-2648-4068-878e-6a9dc18861f1"
  89. },
  90. {
  91. "command": "EVENT_WAIT",
  92. "args": {
  93. "time": 0.5,
  94. "frames": 30
  95. },
  96. "id": "a21ed51b-4d6c-4300-9a5c-57886c410182"
  97. },
  98. {
  99. "command": "EVENT_IF_ACTOR_DISTANCE_FROM_ACTOR",
  100. "args": {
  101. "actorId": "player",
  102. "operator": "<=",
  103. "distance": {
  104. "type": "number",
  105. "value": 10
  106. },
  107. "otherActorId": "$self$",
  108. "__collapseElse": false,
  109. "__collapse": false
  110. },
  111. "children": {
  112. "true": [
  113. {
  114. "command": "EVENT_SET_VALUE",
  115. "args": {
  116. "variable": "L1",
  117. "value": {
  118. "type": "true"
  119. }
  120. },
  121. "id": "2b765ef3-efb0-4ae0-90ac-c9d0d3b4cd6d"
  122. }
  123. ],
  124. "false": [
  125. {
  126. "command": "EVENT_SET_VALUE",
  127. "args": {
  128. "variable": "L1",
  129. "value": {
  130. "type": "false"
  131. }
  132. },
  133. "id": "24d4dcea-ce18-4adc-890b-dd6759978437"
  134. }
  135. ]
  136. },
  137. "id": "c2f0cdcc-f9e9-49bf-8d9c-f62a542f1eb7"
  138. },
  139. {
  140. "command": "EVENT_LOOP_WHILE",
  141. "args": {
  142. "condition": {
  143. "type": "variable",
  144. "value": "L1"
  145. }
  146. },
  147. "children": {
  148. "true": [
  149. {
  150. "command": "EVENT_IF",
  151. "args": {
  152. "condition": {
  153. "type": "eq",
  154. "valueA": {
  155. "type": "variable",
  156. "value": "1"
  157. },
  158. "valueB": {
  159. "type": "number",
  160. "value": 1
  161. }
  162. },
  163. "__collapseElse": false,
  164. "__collapse": false
  165. },
  166. "children": {
  167. "true": [
  168. {
  169. "command": "EVENT_IF",
  170. "args": {
  171. "condition": {
  172. "type": "lt",
  173. "valueA": {
  174. "type": "property",
  175. "target": "player",
  176. "property": "pxpos"
  177. },
  178. "valueB": {
  179. "type": "property",
  180. "target": "$self$",
  181. "property": "pxpos"
  182. }
  183. },
  184. "__collapseElse": false
  185. },
  186. "children": {
  187. "true": [
  188. {
  189. "command": "EVENT_ACTOR_MOVE_RELATIVE",
  190. "args": {
  191. "actorId": "$self$",
  192. "x": {
  193. "type": "number",
  194. "value": 1
  195. },
  196. "y": {
  197. "type": "number",
  198. "value": 0
  199. },
  200. "moveType": "horizontal",
  201. "useCollisions": true,
  202. "__comment": true,
  203. "__collapse": true
  204. },
  205. "id": "ddd0a62c-3fde-49c6-8ef8-bba024330df8"
  206. },
  207. {
  208. "command": "EVENT_ACTOR_PUSH",
  209. "args": {
  210. "continue": true,
  211. "__collapse": false
  212. },
  213. "id": "23334933-bd00-4ae1-a3b0-b2de1a33850f"
  214. }
  215. ],
  216. "false": [
  217. {
  218. "command": "EVENT_ACTOR_MOVE_RELATIVE",
  219. "args": {
  220. "actorId": "$self$",
  221. "x": {
  222. "type": "property",
  223. "target": "player",
  224. "property": "pxpos"
  225. },
  226. "y": {
  227. "type": "property",
  228. "target": "player",
  229. "property": "pypos"
  230. },
  231. "moveType": "horizontal",
  232. "useCollisions": true
  233. },
  234. "id": "e3b00e10-37df-4fa8-9e1a-42e11d23430f"
  235. }
  236. ]
  237. },
  238. "id": "4c1b2cec-0f74-48dc-a84c-e3a32a991f51"
  239. }
  240. ],
  241. "false": [
  242. {
  243. "command": "EVENT_IF",
  244. "args": {
  245. "condition": {
  246. "type": "gt",
  247. "valueA": {
  248. "type": "property",
  249. "target": "player",
  250. "property": "pxpos"
  251. },
  252. "valueB": {
  253. "type": "property",
  254. "target": "$self$",
  255. "property": "pxpos"
  256. }
  257. },
  258. "__collapseElse": false,
  259. "__collapse": false
  260. },
  261. "children": {
  262. "true": [
  263. {
  264. "command": "EVENT_ACTOR_MOVE_RELATIVE",
  265. "args": {
  266. "actorId": "$self$",
  267. "x": {
  268. "type": "number",
  269. "value": -1
  270. },
  271. "y": {
  272. "type": "number",
  273. "value": 0
  274. },
  275. "moveType": "horizontal",
  276. "useCollisions": true,
  277. "__comment": true,
  278. "__collapse": true
  279. },
  280. "id": "fef06e94-31a4-4a22-a047-30ee8f8fbf2e"
  281. },
  282. {
  283. "command": "EVENT_ACTOR_PUSH",
  284. "args": {
  285. "continue": true
  286. },
  287. "id": "b053dbd9-c2f0-4e4a-bd9e-576a43ded6cc"
  288. }
  289. ],
  290. "false": [
  291. {
  292. "command": "EVENT_ACTOR_MOVE_RELATIVE",
  293. "args": {
  294. "actorId": "$self$",
  295. "x": {
  296. "type": "property",
  297. "target": "player",
  298. "property": "pxpos"
  299. },
  300. "y": {
  301. "type": "property",
  302. "target": "player",
  303. "property": "pypos"
  304. },
  305. "moveType": "horizontal",
  306. "useCollisions": true
  307. },
  308. "id": "d81eb6cb-a818-4781-9fef-d2a35cbf6448"
  309. }
  310. ]
  311. },
  312. "id": "c2885866-d3ed-4cc1-8bc3-ceececbb23a1"
  313. }
  314. ]
  315. },
  316. "id": "f9212125-f118-419b-b8e3-adf44e6490da"
  317. }
  318. ]
  319. },
  320. "id": "9f89963c-79e8-4f3b-b9e4-74b416c1dd3b"
  321. }
  322. ],
  323. "hit1Script": [],
  324. "hit2Script": [],
  325. "hit3Script": []
  326. }