From 1a3198bc10481b8cdb76de2f1a5a86cc63fdc7c6 Mon Sep 17 00:00:00 2001 From: yhu351 <yhu351@ucsc.edu> Date: Sat, 25 Nov 2023 17:43:19 -0800 Subject: [PATCH] stalactite has staggering too now --- SneakySalamander.json | 674 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 637 insertions(+), 37 deletions(-) diff --git a/SneakySalamander.json b/SneakySalamander.json index f83daa9b..db37234d 100644 --- a/SneakySalamander.json +++ b/SneakySalamander.json @@ -10753,6 +10753,393 @@ ] } ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "StalagtiteDemon_Base2", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "name": "LifeForce", + "type": "number", + "value": 0 + }, + { + "name": "IsDead", + "type": "boolean", + "value": false + }, + { + "name": "IsKillable", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [ + { + "name": "ShakeObject_PositionAngleScale", + "type": "ShakeObject::ShakeObject_PositionAngleScale" + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.2, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/StalagtiteDemon_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 66.5, + "y": 76 + }, + { + "x": 895, + "y": 67 + }, + { + "x": 785.5, + "y": 432 + }, + { + "x": 512.5, + "y": 693.5 + }, + { + "x": 146, + "y": 477 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/StalagtiteDemon_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 66.5, + "y": 76 + }, + { + "x": 895, + "y": 67 + }, + { + "x": 785.5, + "y": 432 + }, + { + "x": 512.5, + "y": 693.5 + }, + { + "x": 146, + "y": 477 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/StalagtiteDemon_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 66.5, + "y": 76 + }, + { + "x": 895, + "y": 67 + }, + { + "x": 785.5, + "y": 432 + }, + { + "x": 512.5, + "y": 693.5 + }, + { + "x": 146, + "y": 477 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/StalagtiteDemon_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 66.5, + "y": 76 + }, + { + "x": 895, + "y": 67 + }, + { + "x": 785.5, + "y": 432 + }, + { + "x": 512.5, + "y": 693.5 + }, + { + "x": 146, + "y": 477 + } + ] + ] + } + ] + } + ] + } + ] + }, + { + "adaptCollisionMaskAutomatically": false, + "assetStoreId": "", + "name": "StalagtiteDemon_Spike2", + "type": "Sprite", + "updateIfNotVisible": false, + "variables": [ + { + "folded": true, + "name": "LifeForce", + "type": "number", + "value": 0 + }, + { + "name": "IsDead", + "type": "boolean", + "value": false + }, + { + "name": "IsKillable", + "type": "boolean", + "value": false + } + ], + "effects": [], + "behaviors": [ + { + "name": "AdvancedProjectile", + "type": "AdvancedProjectile::AdvancedProjectile", + "MaxLifetime": 0, + "MaxDistanceFromStartingPosition": 0, + "MaxSpeed": 0, + "MinSpeed": 0, + "Acceleration": 550, + "StartingSpeed": 250, + "DeleteWhenLifetimeExceeded": true, + "DeleteWhenDistanceExceeded": true + } + ], + "animations": [ + { + "name": "", + "useMultipleDirections": false, + "directions": [ + { + "looping": true, + "timeBetweenFrames": 0.2, + "sprites": [ + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/Stalatgite_1.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 27.5, + "y": 78.5 + }, + { + "x": 442.5, + "y": 77.5 + }, + { + "x": 229.5, + "y": 968.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/Stalatgite_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 27.5, + "y": 78.5 + }, + { + "x": 442.5, + "y": 77.5 + }, + { + "x": 229.5, + "y": 968.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/Stalatgite_3.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 27.5, + "y": 78.5 + }, + { + "x": 442.5, + "y": 77.5 + }, + { + "x": 229.5, + "y": 968.5 + } + ] + ] + }, + { + "hasCustomCollisionMask": true, + "image": "AssetDev/Entities/StalagtiteDemon/Stalatgite_2.png", + "points": [], + "originPoint": { + "name": "origine", + "x": 0, + "y": 0 + }, + "centerPoint": { + "automatic": true, + "name": "centre", + "x": 0, + "y": 0 + }, + "customCollisionMask": [ + [ + { + "x": 27.5, + "y": 78.5 + }, + { + "x": 442.5, + "y": 77.5 + }, + { + "x": 229.5, + "y": 968.5 + } + ] + ] + } + ] + } + ] + } + ] } ], "objectsFolderStructure": { @@ -10850,7 +11237,13 @@ "objectName": "StalagtiteDemon_Base" }, { - "objectName": "StalagtiteDemon_Spike" + "objectName": "StalagtiteDemon_Spike" + }, + { + "objectName": "StalagtiteDemon_Base2" + }, + { + "objectName": "StalagtiteDemon_Spike2" } ] }, @@ -16703,38 +17096,6 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 0, - "height": 224, - "layer": "", - "name": "SpikeDemon_Base", - "persistentUuid": "57509905-5c3c-4902-a3b6-2bdb307ee5c0", - "width": 224, - "x": 768, - "y": 256, - "zOrder": 93, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "depth": 1, - "height": 224, - "layer": "", - "name": "SpikeDemon_Base2", - "persistentUuid": "05be1341-4565-4cbb-9d6f-b30a38bc5bb1", - "width": 224, - "x": 1088, - "y": 256, - "zOrder": 94, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] } ], "objects": [ @@ -37910,7 +38271,7 @@ "ShakeObject_PositionAngleScale", "1.5", "4", - "3", + "4", "2", "0", "0.04", @@ -37957,7 +38318,7 @@ "colorG": 16, "colorR": 189, "creationTime": 0, - "name": "Spike Demon2", + "name": "Spike Demon 2", "source": "", "type": "BuiltinCommonInstructions::Group", "events": [ @@ -38427,7 +38788,7 @@ "", "\"StalagtiteEnemy\"", ">=", - "3.5" + "4" ] } ], @@ -38439,7 +38800,7 @@ "parameters": [ "StalagtiteDemon_Base", "ShakeObject_PositionAngleScale", - "1.5", + "1", "2", "2", "2", @@ -38481,6 +38842,245 @@ ], "parameters": [] }, + { + "colorB": 224, + "colorG": 16, + "colorR": 189, + "creationTime": 0, + "name": "Stalagtite Demon 2", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Enemy::SetEarlyResetPosition" + }, + "parameters": [ + "", + "StalagtiteDemon_Base2", + "MonsterParticles" + ] + } + ] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Player collides with Spike Demon", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Player", + "StalagtiteDemon_Base2", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::CollideWithEnemy" + }, + "parameters": [ + "", + "Player", + "PlatformerObject", + "StalagtiteDemon_Base2", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Player", + "StalagtiteDemon_Spike2", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::CollideWithEnemy" + }, + "parameters": [ + "", + "Player", + "PlatformerObject", + "StalagtiteDemon_Spike2", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Spike Timer", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "folded": true, + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"StalagtiteEnemy2\"", + ">=", + "5" + ] + } + ], + "actions": [ + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"StalagtiteEnemy2\"" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "for (var x = 0; x < objects.length; x++) {", + " var Stalagtite = objects[x];", + " const Spike = runtimeScene.createObject(\"StalagtiteDemon_Spike2\");", + " Spike.setWidth(96);", + " Spike.setHeight(48);", + " var CenterX = Stalagtite.x + Stalagtite.getWidth()/3;", + " var CenterY = Stalagtite.y + Stalagtite.getHeight() - Stalagtite.getHeight()/3;", + " Spike.setPosition(CenterX, CenterY);", + " Spike.setAngle(90);", + " Spike.setLayer(\"Base Layer\");", + "}" + ], + "parameterObjects": "StalagtiteDemon_Base2", + "useStrict": true, + "eventsSheetExpanded": false + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "", + "\"StalagtiteEnemy2\"", + ">=", + "4" + ] + } + ], + "actions": [ + { + "type": { + "value": "ShakeObject::ShakeObject_PositionAngleScale::ShakeObject_PositionAngleScale" + }, + "parameters": [ + "StalagtiteDemon_Base2", + "ShakeObject_PositionAngleScale", + "1", + "2", + "2", + "2", + "0", + "0.02", + "", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Wait" + }, + "parameters": [ + "2.5" + ] + }, + { + "type": { + "value": "ResetTimer" + }, + "parameters": [ + "", + "\"StalagtiteEnemy2\"" + ] + } + ] + } + ], + "parameters": [] + }, { "colorB": 224, "colorG": 16, -- GitLab