diff --git a/examples/3d-bomber-bunny/3d-bomber-bunny.json b/examples/3d-bomber-bunny/3d-bomber-bunny.json index 5c89b6281..a6a9b37aa 100644 --- a/examples/3d-bomber-bunny/3d-bomber-bunny.json +++ b/examples/3d-bomber-bunny/3d-bomber-bunny.json @@ -3182,238 +3182,232 @@ { "type": "BuiltinCommonInstructions::ForEach", "object": "Player", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Player.Keys.Bomb" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Player.PlayerBehavior::Id()", + "\"A\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "CanPutBomb variable is used to forget the bombs picked by the condition and be able to access the created one." + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyFromTextPressed" + "value": "Player::PlayerBehavior::CanPutBomb" }, "parameters": [ - "", - "Player.Keys.Bomb" + "Player", + "PlayerBehavior", + "Bomb", + "BombBehavior", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "SetBooleanVariable" }, "parameters": [ - "", - "Player.PlayerBehavior::Id()", - "\"A\"", + "CanPutBomb", + "True", "" ] } ] }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "CanPutBomb variable is used to forget the bombs picked by the condition and be able to access the created one." - }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], - "events": [ + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Player::PlayerBehavior::CanPutBomb" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "Bomb", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetBooleanVariable" - }, - "parameters": [ - "CanPutBomb", - "True", - "" - ] - } + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "CanPutBomb", + "True", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::PutBomb" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "Bomb", + "BombBehavior", + "" ] }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "BombModel", + "0", + "0", + "" + ] + }, + { + "type": { + "value": "SetCenter" + }, + "parameters": [ + "BombModel", + "=", + "Bomb.CenterX()", + "=", + "Bomb.CenterY()" + ] + }, + { + "type": { + "value": "Sticker::Sticker::Stick" + }, + "parameters": [ + "BombModel", + "Sticker", + "Bomb", + "" + ] + }, + { + "type": { + "value": "Cache" + }, + "parameters": [ + "Bomb" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BooleanVariable" + "value": "AjoutObjConcern" }, "parameters": [ - "CanPutBomb", - "True", - "" + "", + "Player" ] } ], - "actions": [ - { - "type": { - "value": "Player::PlayerBehavior::PutBomb" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "Bomb", - "BombBehavior", - "" - ] - }, - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "BombModel", - "0", - "0", - "" - ] - }, + "actions": [], + "events": [ { - "type": { - "value": "SetCenter" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "BombModel", - "=", - "Bomb.CenterX()", - "=", - "Bomb.CenterY()" - ] + "comment": "Other players can be on the square where the bomb is put." }, { - "type": { - "value": "Sticker::Sticker::Stick" - }, - "parameters": [ - "BombModel", - "Sticker", - "Bomb", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Bomb" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Player", "conditions": [ { "type": { - "value": "AjoutObjConcern" + "value": "CollisionNP" }, "parameters": [ + "Player", + "Bomb", + "", "", - "Player" + "" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "Player::PlayerBehavior::AllowToWalkOnBomb" }, - "comment": "Other players can be on the square where the bomb is put." - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Player", - "Bomb", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Player::PlayerBehavior::AllowToWalkOnBomb" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "Bomb", - "" - ] - } + "parameters": [ + "Player", + "PlayerBehavior", + "Bomb", + "" ] } ] } ] } - ], - "variables": [ - { - "folded": true, - "name": "CanPutBomb", - "type": "boolean", - "value": false - } ] } + ], + "variables": [ + { + "folded": true, + "name": "CanPutBomb", + "type": "boolean", + "value": false + } ] } ] @@ -3473,29 +3467,67 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [], + "conditions": [ + { + "type": { + "value": "Bomb::BombBehavior::IsReadyToExplode" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Bomb::BombBehavior::Explode" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "ExplosionParticleEmitter", + "" + ] + } + ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "...or by chain reaction." + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Bomb::BombBehavior::IsReadyToExplode" + "value": "AjoutObjConcern" }, "parameters": [ - "Bomb", - "BombBehavior", - "" + "", + "Bomb" ] } ], "actions": [ { "type": { - "value": "Bomb::BombBehavior::Explode" + "value": "Bomb::ExplodeByChainReaction" }, "parameters": [ + "", "Bomb", "BombBehavior", "Explosion", @@ -3504,141 +3536,126 @@ "ExplosionParticleEmitter", "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetBooleanVariable" + "value": "AjoutObjConcern" }, "parameters": [ - "HasNewBombExploded", - "True", - "" + "", + "Explosion" ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Check explosion collision" - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "...or by chain reaction." - }, - { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + }, { "type": { - "value": "BooleanVariable" + "value": "CollisionNP" }, "parameters": [ - "HasNewBombExploded", - "True", + "Explosion", + "Crate", + "", + "", "" ] } ], - "conditions": [], "actions": [ { "type": { - "value": "SetBooleanVariable" + "value": "Wait" }, "parameters": [ - "HasNewBombExploded", - "False", - "" + "1" ] } ], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Random bonus creation" + }, { "type": "BuiltinCommonInstructions::ForEach", - "object": "Bomb", + "object": "Crate", "conditions": [ { "type": { - "value": "CollisionNP" + "value": "BuiltinCommonInstructions::CompareNumbers" }, "parameters": [ - "Explosion", - "Bomb", - "", - "", - "" + "RandomInRange(1, 4)", + "<=", + "1" ] } ], "actions": [ { "type": { - "value": "AjoutObjConcern" + "value": "Player::CreateBonus" }, "parameters": [ "", - "Explosion" + "Bonus", + "Crate.X()", + "Crate.Y()", + "RandomInRange(1,2)", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The crate is removed after because its location is used to create the bonus." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "Bomb::BombBehavior::Explode" + "value": "Delete" }, "parameters": [ - "Bomb", - "BombBehavior", "Explosion", - "ExplosionBehavior", - "Obstacle", - "ExplosionParticleEmitter", "" ] }, { "type": { - "value": "SetBooleanVariable" + "value": "Delete" }, "parameters": [ - "HasNewBombExploded", - "True", + "Crate", "" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Check explosion collision" - } ] } ] } - ], - "variables": [ - { - "folded": true, - "name": "HasNewBombExploded", - "type": "boolean", - "value": false - } ] } ], @@ -3676,43 +3693,109 @@ { "type": "BuiltinCommonInstructions::ForEach", "object": "Player", - "conditions": [], - "actions": [], + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Player", + "Explosion", + "", + "", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "Respawn::Respawn::IsInvincible" + }, + "parameters": [ + "Player", + "Respawn", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "Player::PlayerBehavior::IsDead" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetIsDead" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasScoreChanged", + "True", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CollisionNP" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ - "Player", - "Explosion", - "", "", + "PlayerModel", + "Player", "" ] - }, + } + ], + "actions": [ { "type": { - "inverted": true, - "value": "Respawn::Respawn::IsInvincible" + "value": "Player::PlayerAnimator::PlayDeathAnimationFromExplosion" }, "parameters": [ + "PlayerModel", + "PlayerAnimator", + "Explosion", + "ExplosionBehavior", "Player", - "Respawn", "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "inverted": true, - "value": "Player::PlayerBehavior::IsDead" + "value": "Bomb::ExplosionBehavior::PlayerId" }, "parameters": [ - "Player", - "PlayerBehavior", + "Explosion", + "ExplosionBehavior", + "!=", + "Player.PlayerBehavior::Id()", "" ] } @@ -3720,114 +3803,41 @@ "actions": [ { "type": { - "value": "Player::PlayerBehavior::SetIsDead" + "value": "SetNumberVariable" }, "parameters": [ - "Player", - "PlayerBehavior", - "", - "" + "Score[Explosion.ExplosionBehavior::PlayerId()]", + "+", + "1" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "SetBooleanVariable" + "value": "Bomb::ExplosionBehavior::PlayerId" }, "parameters": [ - "HasScoreChanged", - "True", + "Explosion", + "ExplosionBehavior", + "=", + "Player.PlayerBehavior::Id()", "" ] } ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "PlayerModel", - "Player", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Player::PlayerAnimator::PlayDeathAnimationFromExplosion" - }, - "parameters": [ - "PlayerModel", - "PlayerAnimator", - "Explosion", - "ExplosionBehavior", - "Player", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Bomb::ExplosionBehavior::PlayerId" - }, - "parameters": [ - "Explosion", - "ExplosionBehavior", - "!=", - "Player.PlayerBehavior::Id()", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Score[Explosion.ExplosionBehavior::PlayerId()]", - "+", - "1" - ] - } - ] - }, + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Bomb::ExplosionBehavior::PlayerId" - }, - "parameters": [ - "Explosion", - "ExplosionBehavior", - "=", - "Player.PlayerBehavior::Id()", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetNumberVariable" - }, - "parameters": [ - "Score[Explosion.ExplosionBehavior::PlayerId()]", - "-", - "1" - ] - } + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Score[Explosion.ExplosionBehavior::PlayerId()]", + "-", + "1" ] } ] @@ -3849,29 +3859,75 @@ { "type": "BuiltinCommonInstructions::ForEach", "object": "Player", - "conditions": [], - "actions": [], + "conditions": [ + { + "type": { + "value": "Player::PlayerBehavior::IsDead" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "" + ] + }, + { + "type": { + "value": "Player::PlayerAnimator::CanRespawn" + }, + "parameters": [ + "PlayerModel", + "PlayerAnimator", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetIsDead" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "no", + "" + ] + }, + { + "type": { + "value": "Respawn::Respawn::Respawn" + }, + "parameters": [ + "Player", + "Respawn", + "" + ] + }, + { + "type": { + "value": "Player::PlayerBehavior::GiveBackBonuses" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "Bonus", + "BonusAnimator", + "" + ] + } + ], "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Player::PlayerBehavior::IsDead" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "" - ] - }, - { - "type": { - "value": "Player::PlayerAnimator::CanRespawn" + "value": "LinkedObjects::PickObjectsLinkedTo" }, "parameters": [ + "", "PlayerModel", - "PlayerAnimator", + "Player", "" ] } @@ -3879,67 +3935,14 @@ "actions": [ { "type": { - "value": "Player::PlayerBehavior::SetIsDead" + "value": "Player::PlayerAnimator::PlayRespawnAnimation" }, "parameters": [ - "Player", - "PlayerBehavior", - "no", - "" - ] - }, - { - "type": { - "value": "Respawn::Respawn::Respawn" - }, - "parameters": [ - "Player", - "Respawn", - "" - ] - }, - { - "type": { - "value": "Player::PlayerBehavior::GiveBackBonuses" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "Bonus", - "BonusAnimator", + "PlayerModel", + "PlayerAnimator", "" ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "LinkedObjects::PickObjectsLinkedTo" - }, - "parameters": [ - "", - "PlayerModel", - "Player", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Player::PlayerAnimator::PlayRespawnAnimation" - }, - "parameters": [ - "PlayerModel", - "PlayerAnimator", - "" - ] - } - ] - } ] } ] @@ -4370,6 +4373,7 @@ "height": 128, "layer": "", "name": "PlayerButton", + "opacity": 128, "persistentUuid": "2cfd5749-461c-49c7-aa2c-ed96d18ff8fa", "width": 128, "x": 384, @@ -4621,6 +4625,7 @@ "height": 128, "layer": "", "name": "PlayerButton", + "opacity": 128, "persistentUuid": "4512ec27-3766-449b-9474-40ca30c1073e", "width": 128, "x": 576, @@ -4644,6 +4649,7 @@ "height": 128, "layer": "", "name": "PlayerButton", + "opacity": 128, "persistentUuid": "fd56520c-eac7-4977-a95c-f5c1beb0a154", "width": 128, "x": 768, @@ -5282,17 +5288,6 @@ } ], "actions": [ - { - "type": { - "value": "OpacityCapability::OpacityBehavior::SetValue" - }, - "parameters": [ - "PlayerButton", - "Opacity", - "=", - "127" - ] - }, { "type": { "value": "SetNumberVariable" @@ -5544,162 +5539,6 @@ } ], "externalEvents": [ - { - "associatedLayout": "Game", - "lastChangeTimeStamp": 0, - "name": "Check explosion collision", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Explosion", - "Crate", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Wait" - }, - "parameters": [ - "1" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Random bonus creation" - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Crate", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "RandomInRange(1, 4)", - "<=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Player::CreateBonus" - }, - "parameters": [ - "", - "Bonus", - "Crate.X()", - "Crate.Y()", - "RandomInRange(1,2)", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The crate is removed after because its location is used to create the bonus." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Explosion", - "" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Crate", - "" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Give the player its bomb back." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Player::PlayerBehavior::Id" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "=", - "Bomb.BombBehavior::PlayerId()", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "Player::PlayerBehavior::GetBackBomb" - }, - "parameters": [ - "Player", - "PlayerBehavior", - "" - ] - } - ] - } - ] - }, { "associatedLayout": "Game", "lastChangeTimeStamp": 0, @@ -39333,7 +39172,185 @@ "dependencies": [], "globalVariables": [], "sceneVariables": [], - "eventsFunctions": [], + "eventsFunctions": [ + { + "description": "Explode a bomb into 4 lines of Explosion objects.", + "fullName": "Explode bomb by chain reaction", + "functionType": "Action", + "name": "ExplodeByChainReaction", + "sentence": "_PARAM1_ in contact with _PARAM3_ explode and is stopped by _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "BooleanVariable" + }, + "parameters": [ + "HasNewBombExploded", + "True", + "" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasNewBombExploded", + "False", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Remove the IsDeleted variable when deleted object are taken into account inside a function." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Bomb", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Explosion", + "Bomb", + "", + "", + "" + ] + }, + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsDeleted", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Explosion" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsDeleted", + "True" + ] + }, + { + "type": { + "value": "Bomb::BombBehavior::Explode" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "ParticleEmitter", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasNewBombExploded", + "True", + "" + ] + } + ] + } + ] + } + ], + "variables": [ + { + "folded": true, + "name": "HasNewBombExploded", + "type": "boolean", + "value": true + } + ] + } + ], + "parameters": [ + { + "description": "Bomb", + "name": "Bomb", + "type": "objectList" + }, + { + "description": "Bomb behavior", + "name": "BombBehavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" + }, + { + "description": "Explosion", + "name": "Explosion", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Explosion", + "name": "ExplosionBehavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", + "type": "behavior" + }, + { + "description": "Obstacle", + "name": "Obstacle", + "type": "objectList" + }, + { + "description": "Particle Emitter", + "name": "ParticleEmitter", + "supplementaryInformation": "ParticleEmitter3D::ParticleEmitter3D", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], "eventsBasedBehaviors": [ { "description": "", @@ -41115,7 +41132,6 @@ { "description": "Bonus", "name": "Bonus", - "supplementaryInformation": "Scene3D::Cube3DObject", "type": "objectList" } ], @@ -41433,45 +41449,88 @@ }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "Player::PlayerBehavior::PropertyUsedBomb" - }, - "parameters": [ - "Object", - "Behavior", - "<", - "BombCapacity" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Bomb::BombBehavior::PlayerId" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "=", + "Id", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "OwnedBombCount", + "=", + "PickedInstancesCount(Bomb)" + ] + } ] }, { - "type": { - "value": "BuiltinCommonInstructions::Not" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "CollisionPoint" + "value": "NumberVariable" }, "parameters": [ - "Bomb", - "10 + round((Object.X() - 10) / 60) * 60 + 30", - "round(Object.Y() / 60) * 60 + 30" + "OwnedBombCount", + "<", + "BombCapacity" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Not" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Bomb", + "10 + round((Object.X() - 10) / 60) * 60 + 30", + "round(Object.Y() / 60) * 60 + 30" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] } ], - "actions": [ + "variables": [ { - "type": { - "value": "SetReturnBoolean" - }, - "parameters": [ - "True" - ] + "folded": true, + "name": "OwnedBombCount", + "type": "number", + "value": 0 } ] } @@ -41492,6 +41551,12 @@ "description": "Bomb", "name": "Bomb", "type": "objectList" + }, + { + "description": "Bomb behavior", + "name": "BombBehavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" } ], "objectGroups": [] @@ -41541,28 +41606,6 @@ "+", "1" ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "BombX", - "=", - "Bomb.X()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "BombY", - "=", - "Bomb.Y()" - ] } ] } @@ -41593,45 +41636,6 @@ ], "objectGroups": [] }, - { - "fullName": "Get back a bomb", - "functionType": "Action", - "name": "GetBackBomb", - "sentence": "_PARAM0_ get back a bomb", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Player::PlayerBehavior::SetPropertyUsedBomb" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "max(0, UsedBomb - 1)" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "type": "object" - }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "Player::PlayerBehavior", - "type": "behavior" - } - ], - "objectGroups": [] - }, { "description": "Allow a player to walk on a bomb created under their foot.", "fullName": "Allow to walk on a bomb", @@ -42082,17 +42086,6 @@ "hidden": true, "name": "BombRange" }, - { - "value": "0", - "type": "Number", - "unit": "Dimensionless", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "UsedBomb" - }, { "value": "", "type": "Boolean", diff --git a/examples/goose-bomberman/goose-bomberman.json b/examples/goose-bomberman/goose-bomberman.json index d266b8b8e..034e03cb6 100644 --- a/examples/goose-bomberman/goose-bomberman.json +++ b/examples/goose-bomberman/goose-bomberman.json @@ -1,9 +1,9 @@ { "firstLayout": "", "gdVersion": { - "build": 99, - "major": 4, - "minor": 0, + "build": 213, + "major": 5, + "minor": 4, "revision": 0 }, "properties": { @@ -465,12 +465,15 @@ "resourceFolders": [] }, "objects": [], + "objectsFolderStructure": { + "folderName": "__ROOT" + }, "objectsGroups": [], "variables": [ { "name": "Score", - "type": "string", - "value": "" + "type": "array", + "children": [] }, { "name": "PlayerCount", @@ -483,14 +486,14 @@ "value": "TestLevel" }, { - "name": "Bomb", - "type": "string", - "value": "2" + "name": "BombCapacity", + "type": "number", + "value": 2 }, { - "name": "Flame", - "type": "string", - "value": "2" + "name": "BombRange", + "type": "number", + "value": 2 } ], "layouts": [ @@ -514,12 +517,12 @@ "gridColor": 10401023, "gridAlpha": 0.8, "snap": true, - "zoomFactor": 0.6864000000000002, + "zoomFactor": 0.8375208361058186, "windowMask": false }, "objectsGroups": [ { - "name": "Level", + "name": "LevelButton", "objects": [ { "name": "ClassicLevel" @@ -594,7 +597,8 @@ "customSize": true, "height": 120, "layer": "", - "name": "PlayerX2", + "name": "PlayerButton", + "opacity": 128, "persistentUuid": "2cfd5749-461c-49c7-aa2c-ed96d18ff8fa", "width": 120, "x": 288, @@ -602,37 +606,14 @@ "zOrder": 20, "numberProperties": [], "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 120, - "layer": "", - "name": "PlayerX3", - "persistentUuid": "097572b5-ed3a-413b-9414-6680d3b49700", - "width": 120, - "x": 468, - "y": 192, - "zOrder": 20, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] - }, - { - "angle": 0, - "customSize": true, - "height": 120, - "layer": "", - "name": "PlayerX4", - "persistentUuid": "5e16d213-aeff-4e2c-a891-49982552e0e0", - "width": 120, - "x": 648, - "y": 192, - "zOrder": 20, - "numberProperties": [], - "stringProperties": [], - "initialVariables": [] + "initialVariables": [ + { + "folded": true, + "name": "PlayerCount", + "type": "number", + "value": 2 + } + ] }, { "angle": 0, @@ -873,106 +854,85 @@ "numberProperties": [], "stringProperties": [], "initialVariables": [] - } - ], - "objects": [ + }, { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "PlayerX2", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "angle": 0, + "customSize": true, + "height": 120, + "layer": "", + "name": "PlayerButton", + "opacity": 128, + "persistentUuid": "58b35782-9496-490a-b344-559024bf330b", + "width": 120, + "x": 468, + "y": 192, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "JoueurSelectionMask.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] + "folded": true, + "name": "PlayerCount", + "type": "number", + "value": 3 } ] }, { - "adaptCollisionMaskAutomatically": false, - "assetStoreId": "", - "name": "PlayerX3", - "tags": "", - "type": "Sprite", - "updateIfNotVisible": false, - "variables": [], - "effects": [], - "behaviors": [], - "animations": [ + "angle": 0, + "customSize": true, + "height": 120, + "layer": "", + "name": "PlayerButton", + "opacity": 128, + "persistentUuid": "11cc0435-6aa2-4411-966a-aa8cf59ca1eb", + "width": 120, + "x": 648, + "y": 192, + "zOrder": 20, + "numberProperties": [], + "stringProperties": [], + "initialVariables": [ { - "name": "", - "useMultipleDirections": false, - "directions": [ - { - "looping": false, - "timeBetweenFrames": 0.08, - "sprites": [ - { - "hasCustomCollisionMask": false, - "image": "JoueurSelectionMask.png", - "points": [], - "originPoint": { - "name": "origine", - "x": 0, - "y": 0 - }, - "centerPoint": { - "automatic": true, - "name": "centre", - "x": 0, - "y": 0 - }, - "customCollisionMask": [] - } - ] - } - ] + "folded": true, + "name": "PlayerCount", + "type": "number", + "value": 4 } ] - }, + } + ], + "objects": [ { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", - "name": "PlayerX4", - "tags": "", + "name": "PlayerButton", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], + "variables": [ + { + "folded": true, + "name": "PlayerCount", + "type": "number", + "value": 0 + } + ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { - "name": "4P", + "name": "", "useMultipleDirections": false, "directions": [ { @@ -1006,7 +966,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ClassicLevel", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ @@ -1016,18 +975,29 @@ "value": "ClassicLevel" }, { - "name": "Bomb", - "type": "string", - "value": "1" + "name": "BombCapacity", + "type": "number", + "value": 1 }, { - "name": "Flame", - "type": "string", - "value": "2" + "name": "BombRange", + "type": "number", + "value": 2 } ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { "name": "", @@ -1064,7 +1034,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "EmptyLevel", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ @@ -1074,18 +1043,29 @@ "value": "EmptyLevel" }, { - "name": "Bomb", - "type": "string", - "value": "4" + "name": "BombCapacity", + "type": "number", + "value": 4 }, { - "name": "Flame", - "type": "string", - "value": "6" + "name": "BombRange", + "type": "number", + "value": 6 } ], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { "name": "", @@ -1124,7 +1104,6 @@ "italic": false, "name": "Message", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1138,18 +1117,48 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Bla, bla.\nBla, bla.", + "font": "", + "textAlignment": "", + "characterSize": 32, + "color": "0;0;0" } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Bubble", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { "name": "NewObject", @@ -1186,7 +1195,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Arrow", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1228,12 +1236,22 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Narrator", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], - "behaviors": [], + "behaviors": [ + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM", + "ShouldCheckHovering": true, + "State": "Idle", + "TouchId": 0, + "TouchIsInside": false, + "MouseIsInside": false, + "Index": 2.0247e-320 + } + ], "animations": [ { "name": "", @@ -1270,7 +1288,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Goose1", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1312,7 +1329,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Goose2", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1354,7 +1370,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Goose3", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1396,7 +1411,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Goose4", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -1440,7 +1454,6 @@ "italic": false, "name": "Controls", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [], @@ -1454,9 +1467,70 @@ "b": 66, "g": 61, "r": 41 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "arrows and RShift - ESDF and LShift - IJKL and H - 8456 and 0\nor gamepads", + "font": "", + "textAlignment": "", + "characterSize": 16, + "color": "41;61;66" } } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "PlayerButton" + }, + { + "objectName": "ClassicLevel" + }, + { + "objectName": "EmptyLevel" + }, + { + "objectName": "Message" + }, + { + "objectName": "Bubble" + }, + { + "objectName": "Arrow" + }, + { + "objectName": "Narrator" + }, + { + "objectName": "Goose1" + }, + { + "objectName": "Goose2" + }, + { + "objectName": "Goose3" + }, + { + "objectName": "Goose4" + }, + { + "objectName": "Controls" + } + ] + }, "events": [ { "colorB": 228, @@ -1482,40 +1556,51 @@ "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ - "PlayerCount", + "PlayerButton", + "Opacity", "=", - "2" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "PlayerX2" + "127" ] }, { "type": { - "value": "Opacity" + "value": "SetNumberVariable" }, "parameters": [ - "PlayerX3", + "PlayerCount", "=", - "127" + "2" ] - }, + } + ], + "events": [ { - "type": { - "value": "Opacity" - }, - "parameters": [ - "PlayerX4", - "=", - "127" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberObjectVariable" + }, + "parameters": [ + "PlayerButton", + "PlayerCount", + "=", + "2" + ] + } + ], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "PlayerButton" + ] + } ] } ] @@ -1525,21 +1610,11 @@ "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "ButtonStates::ButtonFSM::IsClicked" }, "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "PlayerX2", - "", - "", + "PlayerButton", + "ButtonFSM", "" ] } @@ -1547,82 +1622,78 @@ "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetNumberVariable" }, "parameters": [ "PlayerCount", "=", - "2" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "PlayerX2" + "PlayerButton.PlayerCount" ] - }, + } + ], + "events": [ { - "type": { - "value": "Montre" - }, - "parameters": [ - "PlayerX3", - "" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "PlayerX4", - "" - ] - }, - { - "type": { - "value": "Opacity" - }, - "parameters": [ - "PlayerX3", - "=", - "127" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "PlayerButton" + ] + }, + { + "type": { + "value": "Montre" + }, + "parameters": [ + "PlayerButton", + "" + ] + } ] }, { - "type": { - "value": "Opacity" - }, - "parameters": [ - "PlayerX4", - "=", - "127" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Cache" + }, + "parameters": [ + "PlayerButton" + ] + } ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Level selection", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "ButtonStates::ButtonFSM::IsClicked" }, "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "PlayerX3", - "", - "", + "LevelButton", + "ButtonFSM", "" ] } @@ -1630,113 +1701,142 @@ "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetStringVariable" }, "parameters": [ - "PlayerCount", + "Level", "=", - "3" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "PlayerX2", - "" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "PlayerX3" + "LevelButton.Name" ] }, { "type": { - "value": "Montre" + "value": "SetNumberVariable" }, "parameters": [ - "PlayerX4", - "" + "BombCapacity", + "=", + "LevelButton.BombCapacity" ] }, { "type": { - "value": "Opacity" + "value": "SetNumberVariable" }, "parameters": [ - "PlayerX2", + "BombRange", "=", - "127" + "LevelButton.BombRange" ] }, { "type": { - "value": "Opacity" + "value": "Scene" }, "parameters": [ - "PlayerX4", - "=", - "127" + "", + "\"Game\"", + "" ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Bubble messages", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "MouseButtonReleased" + "value": "Visible" }, "parameters": [ - "", - "Left" + "Message" ] }, { "type": { - "value": "SourisSurObjet" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "PlayerX4", - "", - "", - "" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "DepartScene" + }, + "parameters": [ + "" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "\"ChangeBuble\"", + "10", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Narrator", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsClicked" + }, + "parameters": [ + "Bubble", + "ButtonFSM", + "" + ] + } ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "AjoutObjConcern" }, "parameters": [ - "PlayerCount", - "=", - "4" + "", + "Bubble" ] }, { "type": { - "value": "Montre" + "value": "ResetTimer" }, "parameters": [ - "PlayerX2", - "" + "", + "\"ChangeBuble\"" ] }, { "type": { - "value": "Montre" + "value": "Cache" }, "parameters": [ - "PlayerX3", - "" + "Message" ] }, { @@ -1744,105 +1844,60 @@ "value": "Cache" }, "parameters": [ - "PlayerX4" + "Bubble" ] }, { "type": { - "value": "Opacity" + "value": "Cache" }, "parameters": [ - "PlayerX2", - "=", - "127" + "Arrow" ] }, { "type": { - "value": "Opacity" - }, - "parameters": [ - "PlayerX3", - "=", - "127" - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Level selection", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" + "value": "Wait" }, "parameters": [ - "", - "Left" + "1" ] }, { "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "Level", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarGlobalTxt" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Level", + "Message", + "Text", "=", - "Level.VariableString(Name)" + "Messages[RandomInRange(0, VariableChildCount(Messages) - 1)]" ] }, { "type": { - "value": "ModVarGlobal" + "value": "Montre" }, "parameters": [ - "Bomb", - "=", - "Level.Variable(Bomb)" + "Message", + "" ] }, { "type": { - "value": "ModVarGlobal" + "value": "Montre" }, "parameters": [ - "Flame", - "=", - "Level.Variable(Flame)" + "Bubble", + "" ] }, { "type": { - "value": "Scene" + "value": "Montre" }, "parameters": [ - "", - "\"Game\"", + "Arrow", "" ] } @@ -1850,310 +1905,24 @@ } ], "parameters": [] - }, + } + ], + "layers": [ { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Bubble messages", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "NeedToChangeMessage", - "=", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Visible" - }, - "parameters": [ - "Message" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "MouseButtonReleased" - }, - "parameters": [ - "", - "Left" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "Narrator", - "", - "", - "" - ] - }, - { - "type": { - "value": "SourisSurObjet" - }, - "parameters": [ - "Bubble", - "", - "", - "" - ] - } - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "NeedToChangeMessage", - "=", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "10", - "\"ChangeBuble\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "NeedToChangeMessage", - "=", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "NeedToChangeMessage", - "=", - "1" - ] - } - ], - "actions": [ - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Message" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Bubble" - ] - }, - { - "type": { - "value": "Cache" - }, - "parameters": [ - "Arrow" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"ShowBuble\"" - ] - }, - { - "type": { - "value": "UnPauseTimer" - }, - "parameters": [ - "", - "\"ShowBuble\"" - ] - } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Timer" - }, - "parameters": [ - "", - "1", - "\"ShowBuble\"" - ] - }, - { - "type": { - "inverted": true, - "value": "TimerPaused" - }, - "parameters": [ - "", - "\"ShowBuble\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Message", - "=", - "VariableString(Messages[ToString(RandomInRange(0, VariableChildCount(Messages) - 1))])" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Message", - "" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Bubble", - "" - ] - }, - { - "type": { - "value": "Montre" - }, - "parameters": [ - "Arrow", - "" - ] - }, - { - "type": { - "value": "PauseTimer" - }, - "parameters": [ - "", - "\"ShowBuble\"" - ] - }, - { - "type": { - "value": "ResetTimer" - }, - "parameters": [ - "", - "\"ChangeBuble\"" - ] - }, - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "NeedToChangeMessage", - "=", - "0" - ] - } - ] - } - ], - "parameters": [] - } - ], - "layers": [ - { - "ambientLightColorB": 8099672, - "ambientLightColorG": 8127688, - "ambientLightColorR": 8867392, - "camera3DFarPlaneDistance": 10000, - "camera3DFieldOfView": 45, - "camera3DNearPlaneDistance": 0.1, - "followBaseLayerCamera": false, - "isLightingLayer": false, - "isLocked": false, - "name": "", - "renderingType": "", - "visibility": true, - "cameras": [ + "ambientLightColorB": 8099672, + "ambientLightColorG": 8127688, + "ambientLightColorR": 8867392, + "camera3DFarPlaneDistance": 10000, + "camera3DFieldOfView": 45, + "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", + "followBaseLayerCamera": false, + "isLightingLayer": false, + "isLocked": false, + "name": "", + "renderingType": "", + "visibility": true, + "cameras": [ { "defaultSize": true, "defaultViewport": true, @@ -2168,11 +1937,44 @@ "effects": [] } ], - "behaviorsSharedData": [] - }, - { - "b": 219, - "disableInputWhenNotFocused": true, + "behaviorsSharedData": [ + { + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" + }, + { + "name": "ButtonFSM", + "type": "ButtonStates::ButtonFSM" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + } + ] + }, + { + "b": 219, + "disableInputWhenNotFocused": true, "mangledName": "Game", "name": "Game", "r": 175, @@ -2247,7 +2049,7 @@ "customSize": true, "height": 24, "layer": "", - "name": "Score", + "name": "ScoreText", "persistentUuid": "42e783b6-213a-45b7-93dd-5d15c9482f94", "width": 48, "x": 72, @@ -2257,9 +2059,9 @@ "stringProperties": [], "initialVariables": [ { - "name": "PlayerNum", - "type": "string", - "value": "1" + "name": "PlayerId", + "type": "number", + "value": 1 } ] }, @@ -2276,13 +2078,7 @@ "zOrder": 1001, "numberProperties": [], "stringProperties": [], - "initialVariables": [ - { - "name": "Number", - "type": "string", - "value": "1" - } - ] + "initialVariables": [] }, { "angle": 0, @@ -2297,13 +2093,7 @@ "zOrder": 1002, "numberProperties": [], "stringProperties": [], - "initialVariables": [ - { - "name": "Number", - "type": "string", - "value": "2" - } - ] + "initialVariables": [] }, { "angle": 0, @@ -2318,13 +2108,7 @@ "zOrder": 1003, "numberProperties": [], "stringProperties": [], - "initialVariables": [ - { - "name": "PlayerNum", - "type": "string", - "value": "4" - } - ] + "initialVariables": [] }, { "angle": 0, @@ -2339,20 +2123,14 @@ "zOrder": 1004, "numberProperties": [], "stringProperties": [], - "initialVariables": [ - { - "name": "Number", - "type": "string", - "value": "3" - } - ] + "initialVariables": [] }, { "angle": 0, "customSize": true, "height": 24, "layer": "", - "name": "Score", + "name": "ScoreText", "persistentUuid": "c9cc7551-b991-48ff-ae7e-10ca7eedc420", "width": 48, "x": 360, @@ -2362,9 +2140,9 @@ "stringProperties": [], "initialVariables": [ { - "name": "PlayerNum", - "type": "string", - "value": "4" + "name": "PlayerId", + "type": "number", + "value": 4 } ] }, @@ -2373,7 +2151,7 @@ "customSize": true, "height": 24, "layer": "", - "name": "Score", + "name": "ScoreText", "persistentUuid": "b35a1096-fe26-4162-988f-887c1db68133", "width": 48, "x": 264, @@ -2383,9 +2161,9 @@ "stringProperties": [], "initialVariables": [ { - "name": "PlayerNum", - "type": "string", - "value": "3" + "name": "PlayerId", + "type": "number", + "value": 3 } ] }, @@ -2394,7 +2172,7 @@ "customSize": true, "height": 24, "layer": "", - "name": "Score", + "name": "ScoreText", "persistentUuid": "970d4113-26f4-41fa-9bb3-716987e4632d", "width": 48, "x": 168, @@ -2404,9 +2182,9 @@ "stringProperties": [], "initialVariables": [ { - "name": "PlayerNum", - "type": "string", - "value": "2" + "name": "PlayerId", + "type": "number", + "value": 2 } ] } @@ -2416,7 +2194,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Wall", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2488,7 +2265,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Crate", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -2560,15 +2336,9 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player1", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ - { - "name": "Number", - "type": "string", - "value": "1" - }, { "name": "Keys", "type": "structure", @@ -2599,23 +2369,20 @@ "value": "Up" } ] - }, - { - "name": "BombCapacity", - "type": "string", - "value": "" - }, - { - "name": "Range", - "type": "string", - "value": "" } ], "effects": [], "behaviors": [ { - "name": "Player", - "type": "Player::Player" + "name": "PlayerBehavior", + "type": "Player::PlayerBehavior", + "Id": 1, + "InitialBombCapacity": 2, + "InitialBombRange": 2, + "BombCapacity": 2, + "BombRange": 2, + "UsedBomb": 0, + "IsDead": false }, { "name": "RemapForTopdown", @@ -2874,7 +2641,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player2", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ @@ -2908,28 +2674,20 @@ "value": "e" } ] - }, - { - "name": "BombCapacity", - "type": "string", - "value": "" - }, - { - "name": "Number", - "type": "string", - "value": "2" - }, - { - "name": "Range", - "type": "string", - "value": "" } ], "effects": [], "behaviors": [ { - "name": "Player", - "type": "Player::Player" + "name": "PlayerBehavior", + "type": "Player::PlayerBehavior", + "Id": 2, + "InitialBombCapacity": 2, + "InitialBombRange": 2, + "BombCapacity": 2, + "BombRange": 2, + "UsedBomb": 0, + "IsDead": false }, { "name": "RemapForTopdown", @@ -3185,15 +2943,9 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player3", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ - { - "name": "Number", - "type": "string", - "value": "3" - }, { "name": "Keys", "type": "structure", @@ -3224,23 +2976,20 @@ "value": "i" } ] - }, - { - "name": "BombCapacity", - "type": "string", - "value": "" - }, - { - "name": "Range", - "type": "string", - "value": "" } ], "effects": [], "behaviors": [ { - "name": "Player", - "type": "Player::Player" + "name": "PlayerBehavior", + "type": "Player::PlayerBehavior", + "Id": 3, + "InitialBombCapacity": 2, + "InitialBombRange": 2, + "BombCapacity": 2, + "BombRange": 2, + "UsedBomb": 0, + "IsDead": false }, { "name": "RemapForTopdown", @@ -3496,15 +3245,9 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Player4", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ - { - "name": "Number", - "type": "string", - "value": "4" - }, { "name": "Keys", "type": "structure", @@ -3535,23 +3278,20 @@ "value": "Numpad8" } ] - }, - { - "name": "BombCapacity", - "type": "string", - "value": "" - }, - { - "name": "Range", - "type": "string", - "value": "" } ], "effects": [], "behaviors": [ { - "name": "Player", - "type": "Player::Player" + "name": "PlayerBehavior", + "type": "Player::PlayerBehavior", + "Id": 4, + "InitialBombCapacity": 2, + "InitialBombRange": 2, + "BombCapacity": 2, + "BombRange": 2, + "UsedBomb": 0, + "IsDead": false }, { "name": "RemapForTopdown", @@ -3807,18 +3547,19 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Bomb", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, - "variables": [ + "variables": [], + "effects": [], + "behaviors": [ { - "name": "Range", - "type": "string", - "value": "" + "name": "BombBehavior", + "type": "Bomb::BombBehavior", + "Delay": 3, + "PlayerId": 0, + "ExplosionRange": 2 } ], - "effects": [], - "behaviors": [], "animations": [ { "name": "NewObject", @@ -3874,15 +3615,17 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Explosion", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], "effects": [], "behaviors": [ { - "name": "ExplosionAnimator", - "type": "BombExplosion::ExplosionAnimator" + "name": "ExplosionBehavior", + "type": "Bomb::ExplosionBehavior", + "PlayerId": 0, + "DirectionX": 0, + "DirectionY": 0 } ], "animations": [ @@ -4612,7 +4355,6 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "Bonus", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [], @@ -4721,16 +4463,15 @@ "assetStoreId": "", "bold": false, "italic": false, - "name": "Score", + "name": "ScoreText", "smoothed": true, - "tags": "", "type": "TextObject::Text", "underlined": false, "variables": [ { - "name": "PlayerNum", - "type": "string", - "value": "" + "name": "PlayerId", + "type": "number", + "value": 0 } ], "effects": [], @@ -4743,16 +4484,42 @@ "b": 0, "g": 0, "r": 0 + }, + "content": { + "bold": false, + "isOutlineEnabled": false, + "isShadowEnabled": false, + "italic": false, + "outlineColor": "255;255;255", + "outlineThickness": 2, + "shadowAngle": 90, + "shadowBlurRadius": 2, + "shadowColor": "0;0;0", + "shadowDistance": 4, + "shadowOpacity": 127, + "smoothed": true, + "underlined": false, + "text": "Score", + "font": "", + "textAlignment": "", + "characterSize": 20, + "color": "0;0;0" } }, { "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ScoreIcon1", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], + "variables": [ + { + "folded": true, + "name": "PlayerId", + "type": "number", + "value": 1 + } + ], "effects": [], "behaviors": [], "animations": [ @@ -4791,10 +4558,16 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ScoreIcon2", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], + "variables": [ + { + "folded": true, + "name": "PlayerId", + "type": "number", + "value": 2 + } + ], "effects": [], "behaviors": [], "animations": [ @@ -4833,14 +4606,14 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ScoreIcon3", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, "variables": [ { - "name": "PlayerNum", - "type": "string", - "value": "3" + "folded": true, + "name": "PlayerId", + "type": "number", + "value": 3 } ], "effects": [], @@ -4881,10 +4654,16 @@ "adaptCollisionMaskAutomatically": false, "assetStoreId": "", "name": "ScoreIcon4", - "tags": "", "type": "Sprite", "updateIfNotVisible": false, - "variables": [], + "variables": [ + { + "folded": true, + "name": "PlayerId", + "type": "number", + "value": 4 + } + ], "effects": [], "behaviors": [], "animations": [ @@ -4920,6 +4699,53 @@ ] } ], + "objectsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "objectName": "Wall" + }, + { + "objectName": "Crate" + }, + { + "objectName": "Player1" + }, + { + "objectName": "Player2" + }, + { + "objectName": "Player3" + }, + { + "objectName": "Player4" + }, + { + "objectName": "Bomb" + }, + { + "objectName": "Explosion" + }, + { + "objectName": "Bonus" + }, + { + "objectName": "ScoreText" + }, + { + "objectName": "ScoreIcon1" + }, + { + "objectName": "ScoreIcon2" + }, + { + "objectName": "ScoreIcon3" + }, + { + "objectName": "ScoreIcon4" + } + ] + }, "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -4940,9 +4766,10 @@ }, "parameters": [ "", - "GlobalVariableString(Level)", + "Level", "0", - "0" + "0", + "" ] } ], @@ -4964,13 +4791,14 @@ "conditions": [ { "type": { - "value": "VarObjet" + "value": "Player::PlayerBehavior::Id" }, "parameters": [ "Player", - "Number", + "PlayerBehavior", ">", - "GlobalVariable(PlayerCount)" + "PlayerCount", + "" ] } ], @@ -4986,18 +4814,48 @@ } ] }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetInitialBombCapacity" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "=", + "BombCapacity", + "" + ] + }, + { + "type": { + "value": "Player::PlayerBehavior::SetInitialBombRange" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "=", + "BombRange", + "" + ] + } + ] + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberObjectVariable" }, "parameters": [ "ScoreIcon", - "PlayerNum", + "PlayerId", ">", - "GlobalVariable(PlayerCount)" + "PlayerCount" ] } ], @@ -5018,13 +4876,13 @@ "conditions": [ { "type": { - "value": "VarObjet" + "value": "NumberObjectVariable" }, "parameters": [ - "Score", - "PlayerNum", + "ScoreText", + "PlayerId", ">", - "GlobalVariable(PlayerCount)" + "PlayerCount" ] } ], @@ -5034,7 +4892,7 @@ "value": "Delete" }, "parameters": [ - "Score", + "ScoreText", "" ] } @@ -5077,11 +4935,11 @@ "actions": [ { "type": { - "value": "Player::Player::PickUpBonus" + "value": "Player::PlayerBehavior::PickUpBonus" }, "parameters": [ "Player", - "Player", + "PlayerBehavior", "Bonus", "" ] @@ -5124,197 +4982,234 @@ { "type": "BuiltinCommonInstructions::ForEach", "object": "Player", - "conditions": [], + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Player.Keys.Bomb" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Player.PlayerBehavior::Id()", + "\"A\"", + "" + ] + } + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], "actions": [], "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "CanPutBomb variable is used to forget the bombs picked by the condition and be able to access the created one." + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [], + "events": [ { - "type": { - "value": "BuiltinCommonInstructions::Or" - }, - "parameters": [], - "subInstructions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "KeyFromTextPressed" + "value": "Player::PlayerBehavior::CanPutBomb" }, "parameters": [ - "", - "Player.VariableString(Keys.Bomb)" + "Player", + "PlayerBehavior", + "Bomb", + "BombBehavior", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "Gamepads::C_Button_pressed" + "value": "SetBooleanVariable" }, "parameters": [ - "", - "Player.Variable(Number)", - "\"A\"", + "CanPutBomb", + "True", "" ] } ] }, - { - "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Check that no bomb is already on this square.\nThe negation of \"Is there at least one bomb on this square?\" is equivalent to \"Is there no bomb on this square?\".\nThis is not the same as having the negation directly on the condition because it would mean \"Is there a bomb that is not on this square?\"." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "BooleanVariable" }, "parameters": [ - "Player", - "BombPut", - "<", - "Player.Variable(BombCapacity)" - ] - }, - { - "type": { - "value": "BuiltinCommonInstructions::Not" - }, - "parameters": [], - "subInstructions": [ - { - "type": { - "value": "CollisionPoint" - }, - "parameters": [ - "Bomb", - "round(Player.X() / 48) * 48 + 24", - "round(Player.Y() / 48) * 48 + 24" - ] - } + "CanPutBomb", + "True", + "" ] } ], "actions": [ { "type": { - "value": "Create" - }, - "parameters": [ - "", - "Bomb", - "round(Player.X() / 48) * 48", - "round(Player.Y() / 48) * 48", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Bomb", - "=", - "Bomb.Y() + 10" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Bomb", - "\"Detonator\"" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Player", - "BombPut", - "+", - "1" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Bomb", - "Range", - "=", - "Player.Variable(Range)" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Player", - "BombX", - "=", - "Bomb.X()" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "Player::PlayerBehavior::PutBomb" }, "parameters": [ "Player", - "BombY", - "=", - "Bomb.Y()" - ] - }, - { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ + "PlayerBehavior", "Bomb", - "PlayerNum", - "=", - "Player.Variable(Number)" + "BombBehavior", + "" ] - }, + } + ], + "events": [ { - "type": { - "value": "SetObjectVariableAsBoolean" - }, - "parameters": [ - "Bomb", - "IsNew", - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "AjoutObjConcern" + }, + "parameters": [ + "", + "Player" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Other players can be on the square where the bomb is put." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Player", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Player", + "Bomb", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::AllowToWalkOnBomb" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "Bomb", + "" + ] + } + ] + } ] } ] } + ], + "variables": [ + { + "folded": true, + "name": "CanPutBomb", + "type": "boolean", + "value": false + } ] } ] - }, + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Collision between bombs and players", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SeparateFromBomb" + }, + "parameters": [ + "Player", + "PlayerBehavior", + "Bomb", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Bomb detonation", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { "type": "BuiltinCommonInstructions::Comment", "color": { @@ -5325,32 +5220,35 @@ "textG": 0, "textR": 0 }, - "comment": "The variable IsNew allows to apply some actions on the created bombes without the player in the context.\nOtherwise, the loop on the players wouldn't work because GDevelop couldn't tell on which player to apply actions." + "comment": "A bomb can explode because of the detonator..." }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Bomb", + "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "Bomb::BombBehavior::IsReadyToExplode" }, "parameters": [ "Bomb", - "IsNew", - "True" + "BombBehavior", + "" ] } ], "actions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "Bomb::BombBehavior::Explode" }, "parameters": [ "Bomb", - "IsNew", - "=" + "BombBehavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "ExplosionParticleEmitter", + "" ] } ], @@ -5365,265 +5263,182 @@ "textG": 0, "textR": 0 }, - "comment": "Other players can be on the square where the bomb is put." + "comment": "...or by chain reaction." }, { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", + "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "CollisionNP" + "value": "AjoutObjConcern" }, "parameters": [ - "Player", - "Bomb", "", - "", - "" + "Bomb" ] } ], "actions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "Bomb::ExplodeByChainReaction" }, "parameters": [ + "", "Bomb", - "IsOverlaping[ToString(Player.Variable(Number))]", - "True" + "BombBehavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "" ] } ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Collision between bombs and players", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", - "conditions": [], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The player no longer overlaps the bomb. It becomes solid for this player." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "inverted": true, - "value": "CollisionNP" + "value": "AjoutObjConcern" }, "parameters": [ - "Player", - "Bomb", "", - "", - "" - ] - }, - { - "type": { - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "Bomb", - "IsOverlaping[ToString(Player.Variable(Number))]", - "True" + "Explosion" ] } ], - "actions": [ - { - "type": { - "value": "ObjectVariableRemoveChild" - }, - "parameters": [ - "Bomb", - "IsOverlaping", - "Player.VariableString(Number)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Player", - "Bomb", - "", - "", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Explosion", + "Wall", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Explosion", + "" + ] + } ] }, { - "type": { - "inverted": true, - "value": "ObjectVariableAsBoolean" - }, - "parameters": [ - "Bomb", - "IsOverlaping[ToString(Player.Variable(Number))]", - "True" - ] - } - ], - "actions": [ - { - "type": { - "value": "SeparateFromObjects" - }, - "parameters": [ - "Player", - "Bomb", - "" - ] - } - ] - } - ] - } - ], - "parameters": [] - }, - { - "colorB": 228, - "colorG": 176, - "colorR": 74, - "creationTime": 0, - "name": "Bomb detonation", - "source": "", - "type": "BuiltinCommonInstructions::Group", - "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "A bomb can explode because of the detonator..." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "Bomb", - "\"Detonator\"", - "3" - ] - } - ], - "actions": [ - { - "type": { - "value": "BombExplosion::Explode" - }, - "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "" - ] - } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Check explosion collision" - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "...or by chain reaction" - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Bomb", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Explosion", - "Bomb", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "BombExplosion::Explode" - }, - "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Explosion", + "Crate", + "", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Random bonus creation" + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Crate", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "RandomInRange(1, 4)", + "<=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::CreateBonus" + }, + "parameters": [ + "", + "Bonus", + "Crate.X()", + "Crate.Y()", + "RandomInRange(1,2)", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The crate is removed after because its location is used to create the bonus." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Explosion", + "" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Crate", + "" + ] + } + ] + } + ] + } ] } - ], - "events": [ - { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Check explosion collision" - } ] } ], @@ -5656,26 +5471,11 @@ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], - "actions": [ - { - "type": { - "value": "SetSceneVariableAsBoolean" - }, - "parameters": [ - "scoreHasChanged", - "False" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", - "conditions": [], "actions": [], "events": [ { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::ForEach", + "object": "Player", "conditions": [ { "type": { @@ -5692,7 +5492,7 @@ { "type": { "inverted": true, - "value": "Respawn::Respawn::isInvincible" + "value": "Respawn::Respawn::IsInvincible" }, "parameters": [ "Player", @@ -5703,34 +5503,35 @@ { "type": { "inverted": true, - "value": "VarObjet" + "value": "Player::PlayerBehavior::IsDead" }, "parameters": [ "Player", - "Death", - "=", - "1" + "PlayerBehavior", + "" ] } ], "actions": [ { "type": { - "value": "SetSceneVariableAsBoolean" + "value": "Player::PlayerBehavior::SetIsDead" }, "parameters": [ - "scoreHasChanged", - "True" + "Player", + "PlayerBehavior", + "", + "" ] }, { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "SetBooleanVariable" }, "parameters": [ - "Player", - "Death", - "True" + "HasScoreChanged", + "True", + "" ] } ], @@ -5740,23 +5541,24 @@ "conditions": [ { "type": { - "value": "VarObjet" + "value": "Bomb::ExplosionBehavior::PlayerId" }, "parameters": [ "Explosion", - "PlayerNum", + "ExplosionBehavior", "!=", - "Player.Variable(Number)" + "Player.PlayerBehavior::Id()", + "" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetNumberVariable" }, "parameters": [ - "Score[Explosion.VariableString(PlayerNum)]", + "Score[Explosion.ExplosionBehavior::PlayerId()]", "+", "1" ] @@ -5768,23 +5570,24 @@ "conditions": [ { "type": { - "value": "VarObjet" + "value": "Bomb::ExplosionBehavior::PlayerId" }, "parameters": [ "Explosion", - "PlayerNum", + "ExplosionBehavior", "=", - "Player.Variable(Number)" + "Player.PlayerBehavior::Id()", + "" ] } ], "actions": [ { "type": { - "value": "ModVarGlobal" + "value": "SetNumberVariable" }, "parameters": [ - "Score[Explosion.VariableString(PlayerNum)]", + "Score[Explosion.ExplosionBehavior::PlayerId()]", "-", "1" ] @@ -5792,55 +5595,49 @@ ] } ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Dead players come back to their initial location." - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", - "conditions": [], - "actions": [], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Dead players come back to their initial location." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Player", "conditions": [ { "type": { - "value": "ObjectVariableAsBoolean" + "value": "Player::PlayerBehavior::IsDead" }, "parameters": [ "Player", - "Death", - "True" + "PlayerBehavior", + "" ] } ], "actions": [ { "type": { - "value": "SetObjectVariableAsBoolean" + "value": "Player::PlayerBehavior::SetIsDead" }, "parameters": [ "Player", - "Death", - "False" + "PlayerBehavior", + "no", + "" ] }, { "type": { - "value": "Respawn::Respawn::respawn" + "value": "Respawn::Respawn::Respawn" }, "parameters": [ "Player", @@ -5850,61 +5647,61 @@ }, { "type": { - "value": "Opacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Player", + "Opacity", "=", "127" ] }, { "type": { - "value": "ModVarObjet" + "value": "Player::PlayerBehavior::GiveBackBonuses" }, "parameters": [ "Player", - "BombPut", - "=", - "0" + "PlayerBehavior", + "Bonus", + "BonusAnimator", + "" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "Player::Player::GiveBackBonuses" + "value": "BooleanVariable" }, "parameters": [ - "Player", - "Player", - "Bonus", + "HasScoreChanged", + "True", "" ] } - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "SceneVariableAsBoolean" - }, - "parameters": [ - "scoreHasChanged", - "True" + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Link", + "include": { + "includeConfig": 0 + }, + "target": "Print score" + } ] } ], - "actions": [], - "events": [ + "variables": [ { - "type": "BuiltinCommonInstructions::Link", - "include": { - "includeConfig": 0 - }, - "target": "Print score" + "folded": true, + "name": "HasScoreChanged", + "type": "boolean", + "value": false } ] }, @@ -5914,7 +5711,7 @@ { "type": { "inverted": true, - "value": "Respawn::Respawn::isInvincible" + "value": "Respawn::Respawn::IsInvincible" }, "parameters": [ "Player", @@ -5926,10 +5723,11 @@ "actions": [ { "type": { - "value": "Opacity" + "value": "OpacityCapability::OpacityBehavior::SetValue" }, "parameters": [ "Player", + "Opacity", "=", "255" ] @@ -5948,6 +5746,7 @@ "camera3DFarPlaneDistance": 10000, "camera3DFieldOfView": 45, "camera3DNearPlaneDistance": 0.1, + "cameraType": "perspective", "followBaseLayerCamera": false, "isLightingLayer": false, "isLocked": false, @@ -5971,21 +5770,53 @@ ], "behaviorsSharedData": [ { - "name": "ExplosionAnimator", - "type": "BombExplosion::ExplosionAnimator" + "name": "Animation", + "type": "AnimatableCapability::AnimatableBehavior" }, { - "name": "Player", - "type": "Player::Player" + "name": "BombBehavior", + "type": "Bomb::BombBehavior" + }, + { + "name": "Effect", + "type": "EffectCapability::EffectBehavior" + }, + { + "name": "ExplosionBehavior", + "type": "Bomb::ExplosionBehavior" + }, + { + "name": "Flippable", + "type": "FlippableCapability::FlippableBehavior" + }, + { + "name": "Opacity", + "type": "OpacityCapability::OpacityBehavior" + }, + { + "name": "PlayerBehavior", + "type": "Player::PlayerBehavior" }, { "name": "RemapForTopdown", "type": "BehaviorRemapper::RemapForTopdown" }, + { + "name": "Resizable", + "type": "ResizableCapability::ResizableBehavior" + }, { "name": "Respawn", "type": "Respawn::Respawn" }, + { + "name": "Scale", + "type": "ScalableCapability::ScalableBehavior" + }, + { + "name": "Text", + "type": "TextContainerCapability::TextContainerBehavior" + }, { "name": "TopDownCornerSlider", "type": "TopDownCornerSliding::TopDownCornerSlider" @@ -6017,92 +5848,125 @@ { "associatedLayout": "Game", "lastChangeTimeStamp": 0, - "name": "Check explosion collision", + "name": "Print score", "events": [ { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Called in \"Game\" and \"Death\"." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Player", "conditions": [ { "type": { - "value": "CollisionNP" + "value": "NumberObjectVariable" }, "parameters": [ - "Explosion", - "Wall", - "", - "", - "" + "ScoreText", + "PlayerId", + "=", + "Player.PlayerBehavior::Id()" ] } ], "actions": [ { "type": { - "value": "Delete" + "value": "TextContainerCapability::TextContainerBehavior::SetValue" }, "parameters": [ - "Explosion", - "" + "ScoreText", + "Text", + "=", + "Score[Player.PlayerBehavior::Id()]" ] } ] - }, + } + ] + } + ], + "eventsFunctionsExtensions": [ + { + "author": "VegeTato, arthuro555", + "category": "General", + "extensionNamespace": "", + "fullName": "Repeat every X seconds", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXJlcGVhdCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xNywxN0g3VjE0TDMsMThMNywyMlYxOUgxOVYxM0gxN003LDdIMTdWMTBMMjEsNkwxNywyVjVINVYxMUg3VjdaIiAvPjwvc3ZnPg==", + "name": "RepeatEveryXSeconds", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/repeat.svg", + "shortDescription": "Trigger an event every X seconds.", + "version": "0.1.1", + "description": "Convenience conditions, actions and behaviors for timers to trigger a condition every X seconds.", + "origin": { + "identifier": "RepeatEveryXSeconds", + "name": "gdevelop-extension-store" + }, + "tags": [ + "repeat", + "timer", + "time" + ], + "authorIds": [ + "ZgrsWuRTAkXgeuPV9bo0zuEcA2w1", + "IRIhkkTTl2UHhfjrLTTH5GYwkYu1", + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Explosion", - "Crate", - "", - "", - "" - ] - } - ], - "actions": [], + "description": "Triggers every X seconds.", + "fullName": "Repeat with a scene timer", + "functionType": "Condition", + "name": "Repeat", + "sentence": "Repeat every _PARAM2_ seconds using timer _PARAM1_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Random bonus creation" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "Egal" + "inverted": true, + "value": "CompareTimer" }, "parameters": [ - "RandomInRange(1,4)", - "<=", - "1" + "", + "TimerName", + ">=", + "0" ] } ], "actions": [ { "type": { - "value": "Player::CreateBonus" + "value": "ResetTimer" }, "parameters": [ - "", - "Bonus", - "Crate.X()", - "Crate.Y()", - "RandomInRange(1,2)", - "" + "player", + "TimerName" + ] + }, + { + "type": { + "value": "ModVarScene" + }, + "parameters": [ + "__RepeatEveryXSeconds.Repetitions[TimerName]", + "=", + "0" ] } ] @@ -6117,197 +5981,252 @@ "textG": 0, "textR": 0 }, - "comment": "The crate is removed after because its location is used to create the bonus." + "comment": "TODO: It should keep the overflowing time to be more precise (it would need JavaScript)" }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "CompareTimer" + }, + "parameters": [ + "player", + "TimerName", + ">=", + "LoopDuration" + ] + } + ], "actions": [ { "type": { - "value": "Delete" + "value": "ResetTimer" }, "parameters": [ - "Explosion", - "" + "player", + "TimerName" ] }, { "type": { - "value": "Delete" + "value": "ModVarScene" }, "parameters": [ - "Crate", - "" + "__RepeatEveryXSeconds.Repetitions[TimerName]", + "+", + "1" + ] + }, + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] } - ] + ], + "parameters": [ + { + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" + }, + { + "description": "Duration in seconds between each repetition", + "name": "LoopDuration", + "type": "expression" + } + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "description": "the number of times the timer has repeated.", + "fullName": "Repetition number of a scene timer", + "functionType": "ExpressionAndCondition", + "name": "Repetition", + "sentence": "Repetition number of timer _PARAM1_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Variable(__RepeatEveryXSeconds.Repetitions[TimerName])" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" }, - "comment": "Give the player its bomb back." + "parameters": [ + { + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" + } + ], + "objectGroups": [] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Triggers every X seconds X amount of times.", + "fullName": "Repeat with a scene timer X times", + "functionType": "Condition", + "name": "RepeatXTimes", + "sentence": "Repeat every _PARAM2_ seconds _PARAM3_ times using timer _PARAM1_", + "events": [ { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Player", - "Number", - "=", - "Bomb.Variable(PlayerNum)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "MaxLoop", + "<", + "0" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::Repetition" + }, + "parameters": [ + "", + "<", + "MaxLoop", + "TimerName", + "" + ] + } + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::Repeat" + }, + "parameters": [ + "", + "TimerName", + "LoopDuration", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Player", - "BombPut", - "-", - "1" - ] + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" + }, + { + "description": "Duration in seconds between each repetition", + "name": "LoopDuration", + "type": "expression" + }, + { + "description": "The limit of loops", + "longDescription": "Maximum nuber of repetition (-1 to repeat forever).", + "name": "MaxLoop", + "type": "expression" } - ] - } - ] - }, - { - "associatedLayout": "Game", - "lastChangeTimeStamp": 0, - "name": "Print score", - "events": [ + ], + "objectGroups": [] + }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Called in \"Game\" and \"Death\"." - }, - { - "type": "BuiltinCommonInstructions::ForEach", - "object": "Player", - "conditions": [ + "description": "Reset repetition count of a scene timer.", + "fullName": "Reset repetition count of a scene timer", + "functionType": "Action", + "name": "DeleteTimer", + "sentence": "Reset repetition count for timer _PARAM1_", + "events": [ { - "type": { - "value": "VarObjet" - }, - "parameters": [ - "Score", - "PlayerNum", - "=", - "Player.Variable(Number)" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RemoveTimer" + }, + "parameters": [ + "player", + "TimerName" + ] + }, + { + "type": { + "value": "VariableRemoveChild" + }, + "parameters": [ + "__RepeatEveryXSeconds.Repetitions", + "TimerName" + ] + } ] } ], - "actions": [ + "parameters": [ { - "type": { - "value": "TextObject::String" - }, - "parameters": [ - "Score", - "=", - "GlobalVariableString(Score[Player.VariableString(Number)])" - ] + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" } - ] + ], + "objectGroups": [] } - ] - } - ], - "eventsFunctionsExtensions": [ - { - "author": "Gustavo Marciano", - "category": "Visual effect", - "extensionNamespace": "", - "fullName": "YSort", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNvcnQtYXNjZW5kaW5nIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDE3SDIyTDE4IDIxTDE0IDE3SDE3VjNIMTlNMiAxN0gxMlYxOUgyTTYgNVY3SDJWNU0yIDExSDlWMTNIMlYxMVoiIC8+PC9zdmc+", - "name": "YSort", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sort-ascending.svg", - "shortDescription": "Create an illusion of depth by setting the Z-order based on the Y position of the object. Useful for isometric games, 2D games with a \"Top-Down\" view, RPG...", - "version": "0.1.0", - "description": [ - "Set the depth (Z-order) of the instance to the value of its Y position in the scene, creating an illusion of depth. The origin point of the object is used to determine the Z-order.", - "", - "This is useful for:", - "- isometric games ([open the project online](https://editor.gdevelop.io/?project=example://isometric-game))", - "- top-down games ([open the project online](https://editor.gdevelop.io/?project=example://top-down-grid-movement))" - ], - "origin": { - "identifier": "YSort", - "name": "gdevelop-extension-store" - }, - "tags": [ - "z-order", - "y-sort", - "depth", - "fake-depth", - "isometric", - "rpg" ], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Set the depth (Z-order) of the instance to the value of its Y position in the scene, creating an illusion of depth. The origin point of the object is used to determine the Z-order.", - "fullName": "YSort", - "name": "YSort", + "description": "Allows to repeat an object timer every X seconds.", + "fullName": "Repeat every X seconds", + "name": "RepeatTimer", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPostEvents", + "name": "onCreated", "sentence": "", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "This is done in doStepPostEvents because the sort must happens right before the rendering to avoid a 1 frame delay." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ChangePlan" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "=", - "Object.Y() + Object.Behavior::PropertyOffset()" + "TimerName" ] } ] @@ -6322,209 +6241,169 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "YSort::YSort", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", "type": "behavior" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "0", - "type": "Number", - "unit": "Pixel", - "label": "Y offset", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Offset" - } - ], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "Input", - "extensionNamespace": "", - "fullName": "Behavior Remapper", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFscGhhLXctYm94LW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxN0EyLDIgMCAwLDEgNywxNVY3SDlWMTVIMTFWOEgxM1YxNUgxNVY3SDE3VjE1QTIsMiAwIDAsMSAxNSwxN0g5TTUsM0gxOUEyLDIgMCAwLDEgMjEsNVYxOUEyLDIgMCAwLDEgMTksMjFINUEyLDIgMCAwLDEgMywxOVY1QTIsMiAwIDAsMSA1LDNNNSw1VjE5SDE5VjVINVoiIC8+PC9zdmc+", - "name": "BehaviorRemapper", - "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/alpha-w-box-outline.svg", - "shortDescription": "Quickly remap Behavior controls to different keys. ", - "version": "1.0.0", - "description": [ - "Make sure to disable default controls unless you want two keys to do the same action.", - "", - "Actions have two versions. `custom` allow the movement keys to be changed to what ever you would like. `presets` provide a common key-bindings that can be selected from a list.", - "", - "### Available Presets:", - "", - "##### `WASD`", - "-\tW: Up", - "-\tA: Left", - "-\tS: Down", - "-\tD: Right", - "-\tSpace: Jump", - "", - "##### `ZQSD`", - "-\tZ: Up", - "-\tQ: Left", - "-\tS: Down", - "-\tD: Right", - "-\tSpace: Jump", - "", - "##### `Numpad` (Num lock must be disabled)", - "-\tNumpad Up: Up", - "-\tNumpad Left: Left", - "-\tNumpad Down: Down", - "-\tNumpad Right: Right", - "-\tNumpad Return/Enter: Jump", - "", - "##### `IJKL`", - "-\tI: Up", - "-\tJ: Left", - "-\tK: Down", - "-\tL: Right", - "-\tReturn/Enter: Jump", - "" - ], - "origin": { - "identifier": "BehaviorRemapper", - "name": "gdevelop-extension-store" - }, - "tags": [ - "remapper", - "key", - "bindings", - "presets", - "platformer", - "top-down" - ], - "authorIds": [ - "AlZ3D1xkH0QDao7T37VZZUeYNpn1" - ], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ - { - "description": "Allows for the controls of a Top-Down behavior to be re-mapped via a single action.", - "fullName": "Remap Top-down", - "name": "RemapForTopdown", - "objectType": "", - "eventsFunctions": [ + }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "description": "Triggers every X seconds.", + "fullName": "Repeat with an object timer", + "functionType": "Condition", + "group": "Timers", + "name": "Repeat2", + "sentence": "Repeat every _PARAM3_ seconds using timer _PARAM2_ of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyFromTextPressed" + "inverted": true, + "value": "CompareObjectTimer" }, "parameters": [ - "", - "Object.Behavior::PropertyUp()" + "Object", + "TimerName", + ">=", + "0" ] } ], "actions": [ { "type": { - "value": "TopDownMovementBehavior::SimulateUpKey" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "Topdown" + "TimerName" + ] + }, + { + "type": { + "value": "ModVarObjet" + }, + "parameters": [ + "Object", + "__RepeatEveryXSeconds.Repetitions[TimerName]", + "=", + "0" ] } ] }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO: It should keep the overflowing time to be more precise (it would need JavaScript)" + }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyFromTextPressed" + "value": "CompareObjectTimer" }, "parameters": [ - "", - "Object.Behavior::PropertyLeft()" + "Object", + "TimerName", + ">=", + "LoopDuration" ] } ], "actions": [ { "type": { - "value": "TopDownMovementBehavior::SimulateLeftKey" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "Topdown" + "TimerName" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + }, { "type": { - "value": "KeyFromTextPressed" + "value": "ModVarObjet" }, "parameters": [ - "", - "Object.Behavior::PropertyRight()" + "Object", + "__RepeatEveryXSeconds.Repetitions[TimerName]", + "+", + "1" ] - } - ], - "actions": [ + }, { "type": { - "value": "TopDownMovementBehavior::SimulateRightKey" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Topdown" + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" }, + { + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" + }, + { + "description": "Duration in seconds between each repetition", + "name": "LoopDuration", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the number of times the timer has repeated.", + "fullName": "Repetition number of an object timer", + "functionType": "ExpressionAndCondition", + "group": "Timers", + "name": "Repetition", + "sentence": "Repetition number of timer _PARAM2_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyFromTextPressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyDown()" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "TopDownMovementBehavior::SimulateDownKey" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Topdown" + "Object.Variable(__RepeatEveryXSeconds.Repetitions[TimerName])" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -6534,72 +6413,144 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", "type": "behavior" + }, + { + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" } ], "objectGroups": [] }, { - "description": "Remaps Top-Down behavior controls to a custom control scheme.", - "fullName": "Remap Top-Down controls to a custom scheme", - "functionType": "Action", - "name": "SetCustom", - "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_", + "description": "Triggers every X seconds X amount of times.", + "fullName": "Repeat with an object timer X times", + "functionType": "Condition", + "group": "Timers", + "name": "RepeatXTimes", + "sentence": "Repeat every _PARAM3_ seconds _PARAM4_ times using timer _PARAM2_ of _PARAM0_", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [] - } - ], - "actions": [ + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "MaxLoop", + "<", + "0" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::Repetition" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "MaxLoop", + "TimerName", + "" + ] + } + ] + }, { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + "value": "RepeatEveryXSeconds::RepeatTimer::Repeat2" }, "parameters": [ "Object", "Behavior", - "=", - "GetArgumentAsString(\"up\")" + "TimerName", + "LoopDuration", + "" ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"left\")" + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + }, + { + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" + }, + { + "description": "Duration in seconds between each repetition", + "name": "LoopDuration", + "type": "expression" + }, + { + "description": "The limit of loops", + "longDescription": "Maximum nuber of repetition (-1 to repeat forever).", + "name": "MaxLoop", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Reset repetition count of an object timer.", + "fullName": "Reset repetition count of an object timer", + "functionType": "Action", + "group": "Timers", + "name": "DeleteTimer", + "sentence": "Reset repetition count for timer _PARAM2_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsString(\"right\")" + "TimerName" ] }, { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + "value": "ObjectVariableRemoveChild" }, "parameters": [ "Object", - "Behavior", - "=", - "GetArgumentAsString(\"down\")" + "__RepeatEveryXSeconds.Repetitions", + "TimerName" ] } ] @@ -6614,327 +6565,215 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", "type": "behavior" }, { - "description": "Up key", - "name": "up", - "type": "key" - }, - { - "description": "Left key", - "name": "left", - "type": "key" - }, - { - "description": "Down key", - "name": "down", - "type": "key" - }, - { - "description": "Right key", - "name": "right", - "type": "key" + "description": "Timer name used to loop", + "name": "TimerName", + "type": "string" } ], "objectGroups": [] }, { - "description": "Remaps Top-Down behavior controls to a preset control scheme.", - "fullName": "Remap Top-Down controls to a preset", - "functionType": "Action", - "name": "SetPreset", - "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "description": "Triggers every X seconds, where X is defined in the behavior properties.", + "fullName": "Repeat every X seconds (deprecated)", + "functionType": "Condition", + "name": "Repeat", + "private": true, + "sentence": "Recurring timer _PARAM1_ of _PARAM0_ has triggered", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "QWERTY bindings" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StrEqual" + "value": "ObjectTimer" }, "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"WASD\"" + "Object", + "TimerName", + "TimerLength" ] - } - ], - "actions": [ + }, { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + "value": "BuiltinCommonInstructions::Or" }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"w\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::PropertyLimit" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "-1" + ] + }, + { + "type": { + "value": "RepeatEveryXSeconds::RepeatTimer::PropertyCounter" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "Limit" + ] + } ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"a\"" + "TimerName" ] }, { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" }, "parameters": [ "Object", "Behavior", - "=", - "\"s\"" + "+", + "1" ] }, { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"d\"" + "True" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "AZERTY bindings" + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StrEqual" - }, - "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"ZQSD\"" - ] - } - ], + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pauses a recurring timer.", + "fullName": "Pause a recurring timer (deprecated)", + "functionType": "Action", + "name": "Pause", + "private": true, + "sentence": "Pause recurring timer _PARAM1_ of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"z\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"q\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"s\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + "value": "PauseObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"d\"" + "TimerName" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Numpad bindings" + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Resumes a paused recurring timer.", + "fullName": "Resume a recurring timer (deprecated)", + "functionType": "Action", + "name": "Resume", + "private": true, + "sentence": "Resume recurring timer _PARAM1_ of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StrEqual" - }, - "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"Numpad\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"NumpadUp\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"NumpadLeft\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"NumpadDown\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + "value": "UnPauseObjectTimer" }, "parameters": [ "Object", - "Behavior", - "=", - "\"NumpadRight\"" + "TimerName" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "QWERTY player 2 bindings " + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Allows to trigger the recurring timer X times again.", + "fullName": "Reset the limit (deprecated)", + "functionType": "Action", + "name": "ResetLimit", + "private": true, + "sentence": "Allow to trigger the recurring timer _PARAM1_ of _PARAM0_ X times again", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "StrEqual" - }, - "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"IJKL\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"i\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"j\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"k\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + "value": "RepeatEveryXSeconds::RepeatTimer::SetPropertyCounter" }, "parameters": [ "Object", "Behavior", "=", - "\"l\"" + "0" ] } ] @@ -6949,14 +6788,8 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "supplementaryInformation": "RepeatEveryXSeconds::RepeatTimer", "type": "behavior" - }, - { - "description": "Preset name", - "name": "options", - "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", - "type": "stringWithSelector" } ], "objectGroups": [] @@ -6964,211 +6797,867 @@ ], "propertyDescriptors": [ { - "value": "w", + "value": "MyTimer", "type": "String", - "label": "Up key", + "label": "The name of the timer to repeat", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "Up" + "deprecated": true, + "name": "TimerName" }, { - "value": "a", - "type": "String", - "label": "Left key", + "value": "1", + "type": "Number", + "label": "The time between each trigger (in seconds)", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "Left" + "deprecated": true, + "name": "TimerLength" }, { - "value": "d", - "type": "String", - "label": "Right key", + "value": "-1", + "type": "Number", + "label": "How many times should the timer trigger? -1 for forever.", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "Right" + "deprecated": true, + "name": "Limit" }, { - "value": "s", - "type": "String", - "label": "Down key", + "value": "0", + "type": "Number", + "label": "An internal counter", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "Down" - }, - { - "value": "", - "type": "Behavior", - "label": "", - "description": "", - "group": "", - "extraInformation": [ - "TopDownMovementBehavior::TopDownMovementBehavior" - ], - "hidden": false, - "name": "Topdown" + "hidden": true, + "name": "Counter" } ], "sharedPropertyDescriptors": [] - }, + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "User interface", + "extensionNamespace": "", + "fullName": "Button states and effects", + "helpPath": "/objects/button", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWdlc3R1cmUtdGFwLWJ1dHRvbiIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xMyA1QzE1LjIxIDUgMTcgNi43OSAxNyA5QzE3IDEwLjUgMTYuMiAxMS43NyAxNSAxMi40NlYxMS4yNEMxNS42MSAxMC42OSAxNiA5Ljg5IDE2IDlDMTYgNy4zNCAxNC42NiA2IDEzIDZTMTAgNy4zNCAxMCA5QzEwIDkuODkgMTAuMzkgMTAuNjkgMTEgMTEuMjRWMTIuNDZDOS44IDExLjc3IDkgMTAuNSA5IDlDOSA2Ljc5IDEwLjc5IDUgMTMgNU0yMCAyMC41QzE5Ljk3IDIxLjMyIDE5LjMyIDIxLjk3IDE4LjUgMjJIMTNDMTIuNjIgMjIgMTIuMjYgMjEuODUgMTIgMjEuNTdMOCAxNy4zN0w4Ljc0IDE2LjZDOC45MyAxNi4zOSA5LjIgMTYuMjggOS41IDE2LjI4SDkuN0wxMiAxOFY5QzEyIDguNDUgMTIuNDUgOCAxMyA4UzE0IDguNDUgMTQgOVYxMy40N0wxNS4yMSAxMy42TDE5LjE1IDE1Ljc5QzE5LjY4IDE2LjAzIDIwIDE2LjU2IDIwIDE3LjE0VjIwLjVNMjAgMkg0QzIuOSAyIDIgMi45IDIgNFYxMkMyIDEzLjExIDIuOSAxNCA0IDE0SDhWMTJMNCAxMkw0IDRIMjBMMjAgMTJIMThWMTRIMjBWMTMuOTZMMjAuMDQgMTRDMjEuMTMgMTQgMjIgMTMuMDkgMjIgMTJWNEMyMiAyLjkgMjEuMTEgMiAyMCAyWiIgLz48L3N2Zz4=", + "name": "ButtonStates", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/753a9a794bd885058159b7509f06f5a8f67f72decfccb9a1b0efee26f41c3c4c_gesture-tap-button.svg", + "shortDescription": "Use any object as a button and change appearance according to user interactions.", + "version": "1.1.0", + "description": [ + "Use the \"Button states\" behavior to track user interactions with an object, including:", + "", + "- Hovered", + "- Pressed", + "- Clicked", + "- Idle", + "", + "Add additional behaviors to make juicy buttons with animated responses to user input:", + "", + "- Size", + "- Color", + "- Animation", + "- Object effects" + ], + "origin": { + "identifier": "ButtonStates", + "name": "gdevelop-extension-store" + }, + "tags": [ + "ui", + "button" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2", + "gqDaZjCfevOOxBYkK6zlhtZnXCg1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ { - "description": "Allows for the controls of a platformer behavior to be re-mapped via a single action.", - "fullName": "Remap Platformer controls", - "name": "RemapForPlatformer", + "description": "Use objects as buttons.", + "fullName": "Button states", + "name": "ButtonFSM", "objectType": "", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", + "name": "doStepPostEvents", "sentence": "", "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Finite state machine", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "KeyFromTextPressed" + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 }, - "parameters": [ - "", - "Object.Behavior::PropertyUp()" - ] - } - ], - "actions": [ + "comment": "The \"Validated\" state only last one frame." + }, { - "type": { - "value": "PlatformBehavior::SimulateUpKey" - }, - "parameters": [ - "Object", - "Platformer" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } ] }, { - "type": { - "value": "PlatformBehavior::SimulateLadderKey" - }, - "parameters": [ - "Object", - "Platformer" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Check position", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Make sure the cursor position is only checked once per frame." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyShouldCheckHovering" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "MouseOnlyCursorX(Object.Layer(), 0)", + "MouseOnlyCursorY(Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Touches are always pressed, so ShouldCheckHovering doesn't matter." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)", + "TouchY(Object.Behavior::PropertyTouchId(), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ] + } + ], + "parameters": [] + }, { - "type": { - "value": "KeyFromTextPressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyLeft()" - ] - } - ], - "actions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch start", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasAnyTouchOrMouseStarted" + }, + "parameters": [ + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "StartedTouchOrMouseCount()", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Object", + "TouchX(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)", + "TouchY(StartedTouchOrMouseId(Object.Behavior::PropertyIndex()), Object.Layer(), 0)" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "StartedTouchOrMouseId(Object.Behavior::PropertyIndex())" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyIndex" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + } + ] + } + ] + } + ], + "parameters": [] + }, { - "type": { - "value": "PlatformBehavior::SimulateLeftKey" - }, - "parameters": [ - "Object", - "Platformer" - ] + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Apply position changes", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyMouseIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Hovered\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyTouchIsInside" + }, + "parameters": [ + "Object", + "Behavior" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedOutside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Handle touch end", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "HasTouchEnded" + }, + "parameters": [ + "", + "Object.Behavior::PropertyTouchId()" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"PressedInside\"" + ] + }, + { + "type": { + "inverted": true, + "value": "ButtonStates::ButtonFSM::PropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Validated\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::SetPropertyState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ] + } + ] + } + ], + "parameters": [] } - ] + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onDeActivate", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyFromTextPressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyRight()" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "PlatformBehavior::SimulateRightKey" + "value": "ButtonStates::ButtonFSM::ResetState" }, "parameters": [ "Object", - "Platformer" + "Behavior", + "" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Reset the state of the button.", + "fullName": "Reset state", + "functionType": "Action", + "name": "ResetState", + "private": true, + "sentence": "Reset the button state of _PARAM0_", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "KeyFromTextPressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyDown()" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "PlatformBehavior::SimulateDownKey" + "value": "ButtonStates::ButtonFSM::SetPropertyState" }, "parameters": [ "Object", - "Platformer" + "Behavior", + "=", + "\"Idle\"" ] }, { "type": { - "value": "PlatformBehavior::SimulateReleaseLadderKey" + "value": "ButtonStates::ButtonFSM::SetPropertyTouchId" }, "parameters": [ "Object", - "Platformer" + "Behavior", + "=", + "0" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is not used.", + "fullName": "Is idle", + "functionType": "Condition", + "name": "IsIdle", + "sentence": "_PARAM0_ is idle", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "KeyFromTextPressed" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ - "", - "Object.Behavior::PropertyJump()" + "Object", + "Behavior", + "=", + "\"Idle\"" ] } ], "actions": [ { "type": { - "value": "PlatformBehavior::SimulateJumpKey" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Platformer" + "True" ] } ] @@ -7183,83 +7672,90 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "supplementaryInformation": "ButtonStates::ButtonFSM", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Remaps Platformer behavior controls to a custom control scheme.", - "fullName": "Remap Platformer controls to a custom scheme", - "functionType": "Action", - "name": "SetCustom", - "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_, Jump: _PARAM6_", + "description": "Check if the button was just clicked.", + "fullName": "Is clicked", + "functionType": "Condition", + "name": "IsClicked", + "sentence": "_PARAM0_ is clicked", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "BuiltinCommonInstructions::Once" - }, - "parameters": [] - } - ], - "actions": [ - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"up\")" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsString(\"left\")" + "\"Validated\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"right\")" + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the cursor is hovered over the button.", + "fullName": "Is hovered", + "functionType": "Condition", + "name": "IsHovered", + "sentence": "_PARAM0_ is hovered", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsString(\"down\")" + "\"Hovered\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "GetArgumentAsString(\"jump\")" + "True" ] } ] @@ -7274,376 +7770,614 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "supplementaryInformation": "ButtonStates::ButtonFSM", "type": "behavior" - }, - { - "description": "Up key", - "name": "up", - "type": "key" - }, - { - "description": "Left key", - "name": "left", - "type": "key" - }, - { - "description": "Down key", - "name": "down", - "type": "key" - }, - { - "description": "Right key", - "name": "right", - "type": "key" - }, - { - "description": "Jump key", - "name": "jump", - "type": "key" } ], "objectGroups": [] }, { - "description": "Remaps Platformer behavior controls to a preset control scheme.", - "fullName": "Remap Platformer controls to a preset", - "functionType": "Action", - "name": "SetPreset", - "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "description": "Check if the button is either hovered or pressed but not hovered.", + "fullName": "Is focused", + "functionType": "Condition", + "name": "IsFocused", + "sentence": "_PARAM0_ is focused", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "QWERTY bindings" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StrEqual" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ - "GetArgumentAsString(\"options\")", + "Object", + "Behavior", "=", - "\"WASD\"" + "\"Hovered\"" ] } ], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"w\"" + "True" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", - "\"a\"" + "\"PressedOutside\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"s\"" + "True" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed with mouse or touch.", + "fullName": "Is pressed", + "functionType": "Condition", + "name": "IsPressed", + "sentence": "_PARAM0_ is pressed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ "Object", "Behavior", "=", - "\"d\"" + "\"PressedInside\"" ] - }, + } + ], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"Space\"" + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "AZERTY bindings" - }, - { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the button is currently being pressed outside with mouse or touch.", + "fullName": "Is held outside", + "functionType": "Condition", + "name": "IsPressedOutside", + "sentence": "_PARAM0_ is held outside", + "events": [ + { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "StrEqual" + "value": "ButtonStates::ButtonFSM::PropertyState" }, "parameters": [ - "GetArgumentAsString(\"options\")", + "Object", + "Behavior", "=", - "\"ZQSD\"" + "\"PressedOutside\"" ] } ], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"z\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"q\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"s\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"d\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"Space\"" + "True" ] } ] - }, + } + ], + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Numpad bindings" + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the touch id that is using the button or 0 if none.", + "fullName": "Touch id", + "functionType": "ExpressionAndCondition", + "name": "TouchId", + "sentence": "the touch id", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "StrEqual" + "value": "SetReturnNumber" }, "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"Numpad\"" + "Object.Behavior::PropertyTouchId()" ] } - ], + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonFSM", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "true", + "type": "Boolean", + "label": "", + "description": "Should check hovering", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "ShouldCheckHovering" + }, + { + "value": "Idle", + "type": "Choice", + "label": "State", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Hovered", + "PressedInside", + "PressedOutside", + "Validated" + ], + "hidden": true, + "name": "State" + }, + { + "value": "0", + "type": "Number", + "label": "Touch id", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchId" + }, + { + "value": "", + "type": "Boolean", + "label": "Touch is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TouchIsInside" + }, + { + "value": "", + "type": "Boolean", + "label": "Mouse is inside", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "MouseIsInside" + }, + { + "value": "", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "Index" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Enable effects on buttons based on their state.", + "fullName": "Button object effects", + "name": "ButtonObjectEffects", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"NumpadUp\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"NumpadLeft\"" - ] - }, - { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", - "Behavior", - "=", - "\"NumpadDown\"" + "Effect", + "Object.Behavior::PropertyIdleEffect()", + "yes" ] }, { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", - "Behavior", - "=", - "\"NumpadRight\"" + "Effect", + "Object.Behavior::PropertyFocusedEffect()", + "no" ] }, { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + "value": "EffectCapability::EffectBehavior::EnableEffect" }, "parameters": [ "Object", - "Behavior", - "=", - "\"NumpadReturn\"" + "Effect", + "Object.Behavior::PropertyPressedEffect()", + "no" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "QWERTY player 2 bindings " - }, + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ { - "type": { - "value": "StrEqual" - }, - "parameters": [ - "GetArgumentAsString(\"options\")", - "=", - "\"IJKL\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyIdleEffect()", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyFocusedEffect()", + "no" + ] + }, + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyPressedEffect()", + "no" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"i\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffects::PropertyIdleEffect" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyIdleEffect()", + "yes" + ] + } ] }, { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"j\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffects::PropertyFocusedEffect" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyFocusedEffect()", + "yes" + ] + } ] }, { - "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"k\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffects::PropertyPressedEffect" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::EnableEffect" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyPressedEffect()", + "yes" + ] + } ] - }, + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state effect of the object.", + "fullName": "Idle state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "IdleEffect", + "sentence": "the idle state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + "value": "SetReturnString" }, "parameters": [ - "Object", - "Behavior", - "=", - "\"l\"" + "Object.Behavior::PropertyIdleEffect()" ] - }, + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleEffect", + "name": "SetIdleEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + "value": "ButtonStates::ButtonObjectEffects::SetPropertyIdleEffect" }, "parameters": [ "Object", "Behavior", "=", - "\"Return\"" + "GetArgumentAsString(\"Value\")" ] } ] @@ -7658,154 +8392,6162 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", "type": "behavior" - }, - { - "description": "Preset name", - "name": "options", - "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", - "type": "stringWithSelector" } ], "objectGroups": [] - } - ], - "propertyDescriptors": [ - { - "value": "", - "type": "String", - "label": "Up key", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Up" }, { - "value": "", - "type": "String", - "label": "Left key", - "description": "", - "group": "", - "extraInformation": [], - "hidden": false, - "name": "Left" - }, + "description": "the focused state effect of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "FocusedEffect", + "sentence": "the focused state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFocusedEffect()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedEffect", + "name": "SetFocusedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffects::SetPropertyFocusedEffect" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state effect of the object.", + "fullName": "Pressed state effect", + "functionType": "ExpressionAndCondition", + "group": "Button object effects configuration", + "name": "PressedEffect", + "sentence": "the pressed state effect", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPressedEffect()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedEffect", + "name": "SetPressedEffect", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffects::SetPropertyPressedEffect" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffects", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ { "value": "", - "type": "String", - "label": "Down key", + "type": "Behavior", + "label": "Button states", "description": "", "group": "", - "extraInformation": [], - "hidden": false, - "name": "Down" + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" }, { "value": "", - "type": "String", - "label": "Right key", + "type": "Behavior", + "label": "Effect capability", "description": "", "group": "", - "extraInformation": [], - "hidden": false, - "name": "Right" + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" }, { "value": "", "type": "String", - "label": "Jump key", + "label": "Idle state effect", "description": "", - "group": "", + "group": "Effects", "extraInformation": [], - "hidden": false, - "name": "Jump" + "name": "IdleEffect" }, { "value": "", - "type": "Behavior", - "label": "", + "type": "String", + "label": "Focused state effect", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Effects", + "extraInformation": [], + "name": "FocusedEffect" + }, + { + "value": "", + "type": "String", + "label": "Pressed state effect", "description": "", - "group": "", - "extraInformation": [ - "PlatformBehavior::PlatformerObjectBehavior" - ], - "hidden": false, - "name": "Platformer" + "group": "Effects", + "extraInformation": [], + "name": "PressedEffect" } ], "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "Movement", - "extensionNamespace": "", - "fullName": "Top-down corner sliding", - "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN1YmRpcmVjdG9yeS1hcnJvdy1yaWdodCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSwxNUwxMywyMUwxMS41OCwxOS41OEwxNS4xNywxNkg0VjRINlYxNEgxNS4xN0wxMS41OCwxMC40MkwxMyw5TDE5LDE1WiIgLz48L3N2Zz4=", - "name": "TopDownCornerSliding", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f1e89ff4f907ed2245e2d4ad2d5f52f9e1bb6d0127aa370d44cc77462e5be8e3_subdirectory-arrow-right.svg", - "shortDescription": "Slide on corners of rectangular obstacles.", - "version": "0.1.0", - "description": [ - "In top-down games, players may have to go though gaps the same size as their avatar. This is almost impossible to do without any assistance. This extension makes objects slide on obstacles to lead them in the right direction.", - "", - "It can be used for:", - "* Bomberman-like games ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))", - "" - ], - "origin": { - "identifier": "TopDownCornerSliding", - "name": "gdevelop-extension-store" - }, - "tags": [ - "top-down", - "movement", - "grid", - "align" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" - ], - "dependencies": [], - "eventsFunctions": [ + }, { - "description": "Define JavaScript classes for top-down.", - "fullName": "Define JavaScript classes for top-down", - "functionType": "Action", - "name": "DefineJavaScriptForTopDown", - "private": true, - "sentence": "Define JavaScript classes for top-down", - "events": [ + "description": "Change the animation of buttons according to their state.", + "fullName": "Button animation", + "name": "ButtonAnimationName", + "objectType": "Sprite", + "eventsFunctions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "GlobalVariableAsBoolean" - }, - "parameters": [ - "__pixelPerfect.TopDownClassesDefined", - "" - ] - } - ], - "actions": [ + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { - "type": { - "value": "SetGlobalVariableAsBoolean" - }, - "parameters": [ - "__pixelPerfect.TopDownClassesDefined", - "True" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyIdleAnimationName()" + ] + } ] } ], - "events": [ + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyIdleAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyFocusedAnimationName()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Object", + "Animation", + "=", + "Object.Behavior::PropertyPressedAnimationName()" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state animation name of the object.", + "fullName": "Idle state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "IdleAnimationName", + "sentence": "the idle state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyIdleAnimationName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleAnimationName", + "name": "SetIdleAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonAnimationName::SetPropertyIdleAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state animation name of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "FocusedAnimationName", + "sentence": "the focused state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFocusedAnimationName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedAnimationName", + "name": "SetFocusedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonAnimationName::SetPropertyFocusedAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state animation name of the object.", + "fullName": "Pressed state animation name", + "functionType": "ExpressionAndCondition", + "group": "Button animation configuration", + "name": "PressedAnimationName", + "sentence": "the pressed state animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPressedAnimationName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedAnimationName", + "name": "SetPressedAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonAnimationName::SetPropertyPressedAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonAnimationName", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "description": "", + "group": "", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "Idle", + "type": "String", + "label": "Idle state animation name", + "description": "", + "group": "Animation", + "extraInformation": [], + "name": "IdleAnimationName" + }, + { + "value": "Focused", + "type": "String", + "label": "Focused state animation name", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Animation", + "extraInformation": [], + "name": "FocusedAnimationName" + }, + { + "value": "Pressed", + "type": "String", + "label": "Pressed state animation name", + "description": "", + "group": "Animation", + "extraInformation": [], + "name": "PressedAnimationName" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change an effect on buttons according to their state.", + "fullName": "Button object effect tween", + "name": "ButtonObjectEffectTween", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyIdleValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyIdleValue()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedValue()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedValue()", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyPressedValue()", + "" + ] + } + ] + } + ], + "parameters": [] + }, + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Tween", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeIn\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFadeInDuration()", + "Object.Behavior::PropertyFadeInEasing()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeOut\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PlayTween" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFadeOutDuration()", + "Object.Behavior::PropertyFadeOutEasing()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Time delta", + "functionType": "Expression", + "name": "TimeDelta", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "TimeDelta() * LayerTimeScale(Object.Layer())" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeIn\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyEffectValue()" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"FadeOut\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenInitialValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyEffectValue()" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTargetedValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Play tween", + "functionType": "Action", + "name": "PlayTween", + "private": true, + "sentence": "Tween the effect property of object _PARAM0_ over _PARAM2_ seconds with _PARAM3_ easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "<", + "GetArgumentAsNumber(\"Duration\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "Object.Behavior::TimeDelta()" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Tween::Ease(GetArgumentAsString(\"Easing\"), Object.Behavior::PropertyTweenInitialValue(), Object.Behavior::PropertyTweenTargetedValue(), Object.Behavior::PropertyTweenTime() / GetArgumentAsNumber(\"Duration\"))" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::PropertyTweenTime" + }, + "parameters": [ + "Object", + "Behavior", + ">=", + "GetArgumentAsNumber(\"Duration\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyTweenState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NoTween\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::PropertyTweenTargetedValue()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EffectCapability::EffectBehavior::SetEffectDoubleParameter" + }, + "parameters": [ + "Object", + "Effect", + "Object.Behavior::PropertyEffectName()", + "Object.Behavior::PropertyEffectProperty()", + "Object.Behavior::PropertyEffectValue()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Duration (in seconds)", + "name": "Duration", + "type": "expression" + }, + { + "description": "Easing", + "name": "Easing", + "supplementaryInformation": "[]", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the effect name of the object.", + "fullName": "Effect name", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectName", + "sentence": "the effect name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyEffectName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "EffectProperty", + "sentence": "the effect parameter", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyEffectProperty()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change the effect parameter of the object. The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "fullName": "Effect parameter", + "functionType": "Action", + "getterName": "EffectName", + "group": "Button effect tween configuration", + "name": "SetEffectProperty", + "sentence": "Change the tweened effect of _PARAM0_ to _PARAM2_ with parameter _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyEffectProperty" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + }, + { + "description": "Effect name", + "name": "EffectName", + "type": "string" + }, + { + "description": "Parameter name", + "name": "PropertyName", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "the idle effect parameter value of the object.", + "fullName": "Idle effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "IdleValue", + "sentence": "the idle effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyIdleValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleValue", + "name": "SetIdleValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyIdleValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused effect parameter value of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FocusedValue", + "sentence": "the focused effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFocusedValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedValue", + "name": "SetFocusedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFocusedValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed effect parameter value of the object.", + "fullName": "Pressed effect parameter value", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "PressedValue", + "sentence": "the pressed effect parameter value", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPressedValue()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedValue", + "name": "SetPressedValue", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyPressedValue" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeInDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button effect tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonObjectEffectTween::SetPropertyFadeOutDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonObjectEffectTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "description": "", + "group": "", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Effect capability", + "description": "", + "group": "", + "extraInformation": [ + "EffectCapability::EffectBehavior" + ], + "name": "Effect" + }, + { + "value": "Effect", + "type": "String", + "label": "Effect name", + "description": "", + "group": "Effect", + "extraInformation": [], + "name": "EffectName" + }, + { + "value": "", + "type": "String", + "label": "Effect parameter", + "description": "The effect parameter names can be found in the effects tab with the \"Show parameter names\" action of the drop down menu.", + "group": "Effect", + "extraInformation": [], + "name": "EffectProperty" + }, + { + "value": "0", + "type": "Number", + "label": "Idle effect parameter value", + "description": "", + "group": "Value", + "extraInformation": [], + "name": "IdleValue" + }, + { + "value": "0", + "type": "Number", + "label": "Focused effect parameter value", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Value", + "extraInformation": [], + "name": "FocusedValue" + }, + { + "value": "0", + "type": "Number", + "label": "Pressed effect parameter value", + "description": "", + "group": "Value", + "extraInformation": [], + "name": "PressedValue" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "0.125", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeInDuration" + }, + { + "value": "0.5", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeOutDuration" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TweenInitialValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TweenTargetedValue" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "TweenTime" + }, + { + "value": "NoTween", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "NoTween", + "FadeIn", + "FadeOut" + ], + "hidden": true, + "name": "TweenState" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "EffectValue" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly resize buttons according to their state.", + "fullName": "Button scale tween", + "name": "ButtonScaleTween", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ScalableCapability::ScalableBehavior::SetValue" + }, + "parameters": [ + "Object", + "Scale", + "=", + "Object.Behavior::PropertyIdleScale()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "Change based on state", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyIdleScale()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedScale()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedScale()", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonScaleTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyPressedScale()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "GetArgumentAsNumber(\"Value\")", + "GetArgumentAsNumber(\"Value\")", + "Object.Behavior::PropertyFadeInEasing()", + "1000 * Object.Behavior::PropertyFadeInDuration()", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectScaleTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonScaleTween.Fade\"", + "GetArgumentAsNumber(\"Value\")", + "GetArgumentAsNumber(\"Value\")", + "Object.Behavior::PropertyFadeOutEasing()", + "1000 * Object.Behavior::PropertyFadeOutDuration()", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state size scale of the object.", + "fullName": "Idle state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "IdleScale", + "sentence": "the idle state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyIdleScale()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleScale", + "name": "SetIdleScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyIdleScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state size scale of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FocusedScale", + "sentence": "the focused state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFocusedScale()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedScale", + "name": "SetFocusedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyFocusedScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state size scale of the object.", + "fullName": "Pressed state size scale", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "PressedScale", + "sentence": "the pressed state size scale", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyPressedScale()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedScale", + "name": "SetPressedScale", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyPressedScale" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeInEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button scale tween configuration", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonScaleTween::SetPropertyFadeOutEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonScaleTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states behavior (required)", + "description": "", + "group": "", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween behavior (required)", + "description": "", + "group": "", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Idle state size scale", + "description": "", + "group": "Size", + "extraInformation": [], + "name": "IdleScale" + }, + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Focused state size scale", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Size", + "extraInformation": [], + "name": "FocusedScale" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeOutDuration" + }, + { + "value": "0.95", + "type": "Number", + "unit": "Dimensionless", + "label": "Pressed state size scale", + "description": "", + "group": "Size", + "extraInformation": [], + "name": "PressedScale" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Smoothly change the color tint of buttons according to their state.", + "fullName": "Button color tint tween", + "name": "ButtonColorTintTween", + "objectType": "Sprite", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeColor" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyIdleColorTint()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "colorB": 228, + "colorG": 176, + "colorR": 74, + "creationTime": 0, + "name": "States", + "source": "", + "type": "BuiltinCommonInstructions::Group", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsIdle" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyIdleColorTint()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsFocused" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Idle\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedColorTint()", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Focused\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeOut" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyFocusedColorTint()", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ButtonStates::ButtonFSM::IsPressed" + }, + "parameters": [ + "Object", + "ButtonFSM", + "" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::PropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "\"Pressed\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyPreviousState" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Pressed\"" + ] + }, + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::FadeIn" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::PropertyPressedColorTint()", + "" + ] + } + ] + } + ], + "parameters": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade in", + "functionType": "Action", + "name": "FadeIn", + "private": true, + "sentence": "_PARAM0_ fade in to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "GetArgumentAsString(\"Value\")", + "Object.Behavior::PropertyFadeInEasing()", + "1000 * Object.Behavior::PropertyFadeInDuration()", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "fullName": "Fade out", + "functionType": "Action", + "name": "FadeOut", + "private": true, + "sentence": "_PARAM0_ fade out to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::AddObjectColorTween" + }, + "parameters": [ + "Object", + "Tween", + "\"__ButtonColorTintTween.Fade\"", + "GetArgumentAsString(\"Value\")", + "Object.Behavior::PropertyFadeOutEasing()", + "1000 * Object.Behavior::PropertyFadeOutDuration()", + "no", + "yes" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "color" + } + ], + "objectGroups": [] + }, + { + "description": "the idle state color tint of the object.", + "fullName": "Idle state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "IdleColorTint", + "sentence": "the idle state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyIdleColorTint()" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "IdleColorTint", + "name": "SetIdleColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyIdleColorTint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the focused state color tint of the object. The state is Focused when the button is hovered or held outside.", + "fullName": "Focused state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FocusedColorTint", + "sentence": "the focused state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFocusedColorTint()" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FocusedColorTint", + "name": "SetFocusedColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyFocusedColorTint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the pressed state color tint of the object.", + "fullName": "Pressed state color tint", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "PressedColorTint", + "sentence": "the pressed state color tint", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyPressedColorTint()" + ] + } + ] + } + ], + "expressionType": { + "type": "color" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "PressedColorTint", + "name": "SetPressedColorTint", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyPressedColorTint" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in duration of the object.", + "fullName": "Fade-in duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInDuration", + "sentence": "the fade-in duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInDuration", + "name": "SetFadeInDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out duration of the object.", + "fullName": "Fade-out duration", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutDuration", + "sentence": "the fade-out duration", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutDuration()" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutDuration", + "name": "SetFadeOutDuration", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutDuration" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsNumber(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-in easing of the object.", + "fullName": "Fade-in easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeInEasing", + "sentence": "the fade-in easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeInEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeInEasing", + "name": "SetFadeInEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeInEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the fade-out easing of the object.", + "fullName": "Fade-out easing", + "functionType": "ExpressionAndCondition", + "group": "Button color tint tween", + "name": "FadeOutEasing", + "sentence": "the fade-out easing", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyFadeOutEasing()" + ] + } + ] + } + ], + "expressionType": { + "supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]", + "type": "stringWithSelector" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "FadeOutEasing", + "name": "SetFadeOutEasing", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ButtonStates::ButtonColorTintTween::SetPropertyFadeOutEasing" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "ButtonStates::ButtonColorTintTween", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Button states", + "description": "", + "group": "", + "extraInformation": [ + "ButtonStates::ButtonFSM" + ], + "name": "ButtonFSM" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween", + "description": "", + "group": "", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "name": "Tween" + }, + { + "value": "255;255;255", + "type": "Color", + "label": "Idle state color tint", + "description": "", + "group": "Color", + "extraInformation": [], + "name": "IdleColorTint" + }, + { + "value": "192;192;192", + "type": "Color", + "label": "Focused state color tint", + "description": "The state is Focused when the button is hovered or held outside.", + "group": "Color", + "extraInformation": [], + "name": "FocusedColorTint" + }, + { + "value": "64;64;64", + "type": "Color", + "label": "Pressed state color tint", + "description": "", + "group": "Color", + "extraInformation": [], + "name": "PressedColorTint" + }, + { + "value": "0.1", + "type": "Number", + "unit": "Second", + "label": "Fade-in duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeInDuration" + }, + { + "value": "0.2", + "type": "Number", + "unit": "Second", + "label": "Fade-out duration", + "description": "", + "group": "Speed", + "extraInformation": [], + "name": "FadeOutDuration" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-in easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeInEasing" + }, + { + "value": "easeInOutQuad", + "type": "Choice", + "label": "Fade-out easing", + "description": "", + "group": "Speed", + "extraInformation": [ + "linear", + "easeInQuad", + "easeOutQuad", + "easeInOutQuad", + "easeInCubic", + "easeOutCubic", + "easeInOutCubic", + "easeInQuart", + "easeOutQuart", + "easeInOutQuart", + "easeInQuint", + "easeOutQuint", + "easeInOutQuint", + "easeInOutSine", + "easeInExpo", + "easeOutExpo", + "easeInOutExpo", + "easeInCirc", + "easeOutCirc", + "easeInOutCirc", + "easeOutBounce", + "easeInBack", + "easeOutBack", + "easeInOutBack", + "elastic", + "swingFromTo", + "swingFrom", + "swingTo", + "bounce", + "bouncePast", + "easeFromTo", + "easeFrom", + "easeTo" + ], + "name": "FadeOutEasing" + }, + { + "value": "Idle", + "type": "Choice", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "Idle", + "Focused", + "Pressed" + ], + "hidden": true, + "name": "PreviousState" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "Gustavo Marciano", + "category": "Visual effect", + "extensionNamespace": "", + "fullName": "YSort", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNvcnQtYXNjZW5kaW5nIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDE3SDIyTDE4IDIxTDE0IDE3SDE3VjNIMTlNMiAxN0gxMlYxOUgyTTYgNVY3SDJWNU0yIDExSDlWMTNIMlYxMVoiIC8+PC9zdmc+", + "name": "YSort", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sort-ascending.svg", + "shortDescription": "Create an illusion of depth by setting the Z-order based on the Y position of the object. Useful for isometric games, 2D games with a \"Top-Down\" view, RPG...", + "version": "0.1.0", + "description": [ + "Set the depth (Z-order) of the instance to the value of its Y position in the scene, creating an illusion of depth. The origin point of the object is used to determine the Z-order.", + "", + "This is useful for:", + "- isometric games ([open the project online](https://editor.gdevelop.io/?project=example://isometric-game))", + "- top-down games ([open the project online](https://editor.gdevelop.io/?project=example://top-down-grid-movement))" + ], + "origin": { + "identifier": "YSort", + "name": "gdevelop-extension-store" + }, + "tags": [ + "z-order", + "y-sort", + "depth", + "fake-depth", + "isometric", + "rpg" + ], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Set the depth (Z-order) of the instance to the value of its Y position in the scene, creating an illusion of depth. The origin point of the object is used to determine the Z-order.", + "fullName": "YSort", + "name": "YSort", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "This is done in doStepPostEvents because the sort must happens right before the rendering to avoid a 1 frame delay." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Object", + "=", + "Object.Y() + Object.Behavior::PropertyOffset()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "YSort::YSort", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "Y offset", + "description": "", + "group": "", + "extraInformation": [], + "name": "Offset" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Input", + "extensionNamespace": "", + "fullName": "Behavior Remapper", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWFscGhhLXctYm94LW91dGxpbmUiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNOSwxN0EyLDIgMCAwLDEgNywxNVY3SDlWMTVIMTFWOEgxM1YxNUgxNVY3SDE3VjE1QTIsMiAwIDAsMSAxNSwxN0g5TTUsM0gxOUEyLDIgMCAwLDEgMjEsNVYxOUEyLDIgMCAwLDEgMTksMjFINUEyLDIgMCAwLDEgMywxOVY1QTIsMiAwIDAsMSA1LDNNNSw1VjE5SDE5VjVINVoiIC8+PC9zdmc+", + "name": "BehaviorRemapper", + "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/alpha-w-box-outline.svg", + "shortDescription": "Quickly remap Behavior controls to different keys. ", + "version": "1.0.0", + "description": [ + "Make sure to disable default controls unless you want two keys to do the same action.", + "", + "Actions have two versions. `custom` allow the movement keys to be changed to what ever you would like. `presets` provide a common key-bindings that can be selected from a list.", + "", + "### Available Presets:", + "", + "##### `WASD`", + "-\tW: Up", + "-\tA: Left", + "-\tS: Down", + "-\tD: Right", + "-\tSpace: Jump", + "", + "##### `ZQSD`", + "-\tZ: Up", + "-\tQ: Left", + "-\tS: Down", + "-\tD: Right", + "-\tSpace: Jump", + "", + "##### `Numpad` (Num lock must be disabled)", + "-\tNumpad Up: Up", + "-\tNumpad Left: Left", + "-\tNumpad Down: Down", + "-\tNumpad Right: Right", + "-\tNumpad Return/Enter: Jump", + "", + "##### `IJKL`", + "-\tI: Up", + "-\tJ: Left", + "-\tK: Down", + "-\tL: Right", + "-\tReturn/Enter: Jump", + "" + ], + "origin": { + "identifier": "BehaviorRemapper", + "name": "gdevelop-extension-store" + }, + "tags": [ + "remapper", + "key", + "bindings", + "presets", + "platformer", + "top-down" + ], + "authorIds": [ + "AlZ3D1xkH0QDao7T37VZZUeYNpn1" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Allows for the controls of a Top-Down behavior to be re-mapped via a single action.", + "fullName": "Remap Top-down", + "name": "RemapForTopdown", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyUp()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyLeft()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyRight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyDown()" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Topdown" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Top-Down behavior controls to a custom control scheme.", + "fullName": "Remap Top-Down controls to a custom scheme", + "functionType": "Action", + "name": "SetCustom", + "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"up\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"left\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"right\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"down\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + }, + { + "description": "Up key", + "name": "up", + "type": "key" + }, + { + "description": "Left key", + "name": "left", + "type": "key" + }, + { + "description": "Down key", + "name": "down", + "type": "key" + }, + { + "description": "Right key", + "name": "right", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Top-Down behavior controls to a preset control scheme.", + "fullName": "Remap Top-Down controls to a preset", + "functionType": "Action", + "name": "SetPreset", + "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"WASD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"w\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"a\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AZERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"ZQSD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"z\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"q\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Numpad bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"Numpad\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadUp\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadLeft\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadDown\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadRight\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY player 2 bindings " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"IJKL\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"i\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"j\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"k\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForTopdown::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"l\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForTopdown", + "type": "behavior" + }, + { + "description": "Preset name", + "name": "options", + "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "w", + "type": "String", + "label": "Up key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Up" + }, + { + "value": "a", + "type": "String", + "label": "Left key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Left" + }, + { + "value": "d", + "type": "String", + "label": "Right key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Right" + }, + { + "value": "s", + "type": "String", + "label": "Down key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Down" + }, + { + "value": "", + "type": "Behavior", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "TopDownMovementBehavior::TopDownMovementBehavior" + ], + "name": "Topdown" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Allows for the controls of a platformer behavior to be re-mapped via a single action.", + "fullName": "Remap Platformer controls", + "name": "RemapForPlatformer", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyUp()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateLadderKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyLeft()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyRight()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyDown()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + }, + { + "type": { + "value": "PlatformBehavior::SimulateReleaseLadderKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextPressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyJump()" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "Platformer" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Platformer behavior controls to a custom control scheme.", + "fullName": "Remap Platformer controls to a custom scheme", + "functionType": "Action", + "name": "SetCustom", + "sentence": "Remap controls of _PARAM0_: Up: _PARAM2_, Left: _PARAM3_, Down: _PARAM4_, Right: _PARAM5_, Jump: _PARAM6_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"up\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"left\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"right\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"down\")" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"jump\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + }, + { + "description": "Up key", + "name": "up", + "type": "key" + }, + { + "description": "Left key", + "name": "left", + "type": "key" + }, + { + "description": "Down key", + "name": "down", + "type": "key" + }, + { + "description": "Right key", + "name": "right", + "type": "key" + }, + { + "description": "Jump key", + "name": "jump", + "type": "key" + } + ], + "objectGroups": [] + }, + { + "description": "Remaps Platformer behavior controls to a preset control scheme.", + "fullName": "Remap Platformer controls to a preset", + "functionType": "Action", + "name": "SetPreset", + "sentence": "Remap controls of _PARAM0_ to preset _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"WASD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"w\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"a\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Space\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "AZERTY bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"ZQSD\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"z\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"q\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"s\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"d\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Space\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Numpad bindings" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"Numpad\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadUp\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadLeft\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadDown\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadRight\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"NumpadReturn\"" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "QWERTY player 2 bindings " + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StrEqual" + }, + "parameters": [ + "GetArgumentAsString(\"options\")", + "=", + "\"IJKL\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyUp" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"i\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyLeft" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"j\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyDown" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"k\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyRight" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"l\"" + ] + }, + { + "type": { + "value": "BehaviorRemapper::RemapForPlatformer::SetPropertyJump" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Return\"" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "BehaviorRemapper::RemapForPlatformer", + "type": "behavior" + }, + { + "description": "Preset name", + "name": "options", + "supplementaryInformation": "[\"WASD\",\"ZQSD\",\"Numpad\",\"IJKL\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "String", + "label": "Up key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Up" + }, + { + "value": "", + "type": "String", + "label": "Left key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Left" + }, + { + "value": "", + "type": "String", + "label": "Down key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Down" + }, + { + "value": "", + "type": "String", + "label": "Right key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Right" + }, + { + "value": "", + "type": "String", + "label": "Jump key", + "description": "", + "group": "", + "extraInformation": [], + "name": "Jump" + }, + { + "value": "", + "type": "Behavior", + "label": "", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "name": "Platformer" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Top-down corner sliding", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXN1YmRpcmVjdG9yeS1hcnJvdy1yaWdodCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0xOSwxNUwxMywyMUwxMS41OCwxOS41OEwxNS4xNywxNkg0VjRINlYxNEgxNS4xN0wxMS41OCwxMC40MkwxMyw5TDE5LDE1WiIgLz48L3N2Zz4=", + "name": "TopDownCornerSliding", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/f1e89ff4f907ed2245e2d4ad2d5f52f9e1bb6d0127aa370d44cc77462e5be8e3_subdirectory-arrow-right.svg", + "shortDescription": "Slide on corners of rectangular obstacles.", + "version": "0.1.0", + "description": [ + "In top-down games, players may have to go though gaps the same size as their avatar. This is almost impossible to do without any assistance. This extension makes objects slide on obstacles to lead them in the right direction.", + "", + "It can be used for:", + "* Bomberman-like games ([open the project online](https://editor.gdevelop.io/?project=example://goose-bomberman))", + "" + ], + "origin": { + "identifier": "TopDownCornerSliding", + "name": "gdevelop-extension-store" + }, + "tags": [ + "top-down", + "movement", + "grid", + "align" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Define JavaScript classes for top-down.", + "fullName": "Define JavaScript classes for top-down", + "functionType": "Action", + "name": "DefineJavaScriptForTopDown", + "private": true, + "sentence": "Define JavaScript classes for top-down", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GlobalVariableAsBoolean" + }, + "parameters": [ + "__pixelPerfect.TopDownClassesDefined", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetGlobalVariableAsBoolean" + }, + "parameters": [ + "__pixelPerfect.TopDownClassesDefined", + "True" + ] + } + ], + "events": [ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ @@ -9126,7 +15868,6 @@ "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, "name": "TopDownMovement" } ], @@ -9358,7 +16099,6 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, "name": "SlidingCornerSize" } ], @@ -9412,6 +16152,8 @@ "mnImQKdn8nQxwzkS5D6a1JB27V23" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { "description": "Get the value of the pressure on a gamepad trigger.", @@ -11846,31 +18588,221 @@ ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Down\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateDownKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"A or Cross\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"A\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"B or Circle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"B\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"X or Square\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"X\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Y or Triangle\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Y\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"LB or L1\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"LB\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" ] } ] @@ -11886,7 +18818,7 @@ "Object", "Behavior", "=", - "\"A or Cross\"" + "\"RB or R1\"" ] }, { @@ -11896,7 +18828,7 @@ "parameters": [ "", "Object.Behavior::PropertyGamepadIdentifier()", - "\"A\"", + "\"RB\"", "\"Left\"" ] } @@ -11924,7 +18856,7 @@ "Object", "Behavior", "=", - "\"B or Circle\"" + "\"LT or L2\"" ] }, { @@ -11934,7 +18866,7 @@ "parameters": [ "", "Object.Behavior::PropertyGamepadIdentifier()", - "\"B\"", + "\"LT\"", "\"Left\"" ] } @@ -11962,29 +18894,270 @@ "Object", "Behavior", "=", - "\"X or Square\"" + "\"RT or R2\"" + ] + }, + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"RT\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlatformBehavior::SimulateJumpKey" + }, + "parameters": [ + "Object", + "PlatformerCharacter" + ] + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Gamepads::PlatformerGamepadMapper", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Platformer character behavior", + "description": "", + "group": "", + "extraInformation": [ + "PlatformBehavior::PlatformerObjectBehavior" + ], + "name": "PlatformerCharacter" + }, + { + "value": "1", + "type": "Number", + "label": "Gamepad identifier (1, 2, 3 or 4)", + "description": "", + "group": "", + "extraInformation": [], + "name": "GamepadIdentifier" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use directional pad", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseArrows" + }, + { + "value": "true", + "type": "Boolean", + "label": "Use left stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseLeftStick" + }, + { + "value": "", + "type": "Boolean", + "label": "Use right stick", + "description": "", + "group": "Controls", + "extraInformation": [], + "name": "UseRightStick" + }, + { + "value": "A or Cross", + "type": "Choice", + "label": "Jump button", + "description": "", + "group": "Controls", + "extraInformation": [ + "A or Cross", + "B or Circle", + "X or Square", + "Y or Triangle", + "LB or L1", + "RB or R1", + "LT or L2", + "RT or R2" + ], + "name": "JumpButton" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Control a top-down character with a gamepad.", + "fullName": "Top-down gamepad mapper", + "name": "TopDownGamepadMapper", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Controller_X_is_connected" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } ] }, { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"X\"", - "\"Left\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Up\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Button_pressed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Down\"", + "\"Left\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } ] } ] @@ -11994,73 +19167,203 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" }, "parameters": [ "Object", - "Behavior", - "=", - "\"Y or Triangle\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Y\"", - "\"Left\"" + "Behavior" ] } ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LB or L1\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")" + ] + } ] }, { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"LB\"", - "\"Left\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\"))" + ] + } ] - } - ], - "actions": [ + }, { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Left\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } ] } ] @@ -12070,111 +19373,203 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" + "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" }, "parameters": [ "Object", - "Behavior", - "=", - "\"RB or R1\"" - ] - }, - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"RB\"", - "\"Left\"" + "Behavior" ] } ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "actions": [], + "events": [ { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"LT or L2\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Analog\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")", + "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")" + ] + } ] }, { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"LT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyJumpButton" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"RT or R2\"" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"360°\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateStick" + }, + "parameters": [ + "Object", + "TopDownMovement", + "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\"))", + "1" + ] + } ] }, { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"RT\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "PlatformBehavior::SimulateJumpKey" - }, - "parameters": [ - "Object", - "PlatformerCharacter" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"8 Directions\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Left\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateLeftKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Right\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateRightKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Up\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateUpKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Gamepads::C_Axis_pushed" + }, + "parameters": [ + "", + "Object.Behavior::PropertyGamepadIdentifier()", + "\"Right\"", + "\"Down\"", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementBehavior::SimulateDownKey" + }, + "parameters": [ + "Object", + "TopDownMovement" + ] + } + ] + } ] } ] @@ -12191,7 +19586,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Gamepads::PlatformerGamepadMapper", + "supplementaryInformation": "Gamepads::TopDownGamepadMapper", "type": "behavior" } ], @@ -12202,14 +19597,13 @@ { "value": "", "type": "Behavior", - "label": "Platformer character behavior", + "label": "Top-down movement behavior", "description": "", "group": "", "extraInformation": [ - "PlatformBehavior::PlatformerObjectBehavior" + "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, - "name": "PlatformerCharacter" + "name": "TopDownMovement" }, { "value": "1", @@ -12218,7 +19612,6 @@ "description": "", "group": "", "extraInformation": [], - "hidden": false, "name": "GamepadIdentifier" }, { @@ -12228,7 +19621,6 @@ "description": "", "group": "Controls", "extraInformation": [], - "hidden": false, "name": "UseArrows" }, { @@ -12238,7 +19630,6 @@ "description": "", "group": "Controls", "extraInformation": [], - "hidden": false, "name": "UseLeftStick" }, { @@ -12248,180 +19639,108 @@ "description": "", "group": "Controls", "extraInformation": [], - "hidden": false, "name": "UseRightStick" }, { - "value": "A or Cross", + "value": "Analog", "type": "Choice", - "label": "Jump button", + "label": "Stick mode", "description": "", "group": "Controls", "extraInformation": [ - "A or Cross", - "B or Circle", - "X or Square", - "Y or Triangle", - "LB or L1", - "RB or R1", - "LT or L2", - "RT or R2" + "Analog", + "360°", + "8 Directions" ], - "hidden": false, - "name": "JumpButton" + "name": "StickMode" } ], "sharedPropertyDescriptors": [] - }, + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "Movement", + "extensionNamespace": "", + "fullName": "Top-down movement animator", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNNiwyMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNsLTQtNC4xYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNC4xYzAuNC0wLjQsMS0wLjQsMS40LDBzMC40LDEsMCwxLjRMMy40LDE2bDMuMywzLjMNCgkJYzAuNCwwLjQsMC40LDEsMCwxLjRDNi42LDIxLDYuMywyMS4xLDYsMjEuMXoiLz4NCjwvZz4NCjxnPg0KCTxwYXRoIGQ9Ik0yNiwyMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNjLTAuNC0wLjQtMC40LTEsMC0xLjRsMy4zLTMuM2wtMy4zLTMuM2MtMC40LTAuNC0wLjQtMSwwLTEuNHMxLTAuNCwxLjQsMGw0LjEsNC4xDQoJCWMwLjIsMC4yLDAuMywwLjQsMC4zLDAuN3MtMC4xLDAuNS0wLjMsMC43bC00LjEsNC4xQzI2LjYsMjEsMjYuMywyMS4xLDI2LDIxLjF6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTYsMzEuMUwxNiwzMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNsLTQtNC4xYy0wLjQtMC40LTAuNC0xLDAtMS40czEtMC40LDEuNCwwbDMuMywzLjNsMy4zLTMuM2MwLjQtMC40LDEtMC40LDEuNCwwDQoJCXMwLjQsMSwwLDEuNGwtNC4xLDQuMUMxNi42LDMwLjksMTYuMywzMS4xLDE2LDMxLjF6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMjAuMSw3Yy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNMMTYsMy40bC0zLjMsMy4zYy0wLjQsMC40LTEsMC40LTEuNCwwcy0wLjQtMSwwLTEuNGw0LTQuMWMwLjQtMC40LDEtMC40LDEuNCwwbDQuMSw0LjENCgkJYzAuNCwwLjQsMC40LDEsMCwxLjRDMjAuNiw2LjksMjAuNCw3LDIwLjEsN3oiLz4NCjwvZz4NCjxnPg0KCTxwYXRoIGQ9Ik0xNiwzMGMtMC42LDAtMS0wLjQtMS0xVjNjMC0wLjYsMC40LTEsMS0xczEsMC40LDEsMXYyNkMxNywyOS42LDE2LjYsMzAsMTYsMzB6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMjksMTdIMmMtMC42LDAtMS0wLjQtMS0xczAuNC0xLDEtMWgyN2MwLjYsMCwxLDAuNCwxLDFTMjkuNiwxNywyOSwxN3oiLz4NCjwvZz4NCjwvc3ZnPg0K", + "name": "TopDownMovementAnimator", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Arrows/a6026156355ae5f03613b03971e4ddb50d0c95b8901e7a21edc57f33f0032e42_Arrows_thin_arrows_all_directions_cross.svg", + "shortDescription": "Change the animation according to the movement direction.", + "version": "0.1.1", + "description": "Change the animation according to the movement direction.", + "origin": { + "identifier": "TopDownMovementAnimator", + "name": "gdevelop-extension-store" + }, + "tags": [ + "top-down", + "animation", + "direction" + ], + "authorIds": [ + "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ { - "description": "Control a top-down character with a gamepad.", - "fullName": "Top-down gamepad mapper", - "name": "TopDownGamepadMapper", - "objectType": "", + "description": "Change the animation according to the movement direction.", + "fullName": "Top-down movement animator", + "name": "TopDownMovementAnimator", + "objectType": "Sprite", "eventsFunctions": [ { "fullName": "", "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Controller_X_is_connected" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseArrows" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Left\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateLeftKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateRightKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Up\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateUpKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyDirectionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::DiagonalsAllowed" + }, + "parameters": [ + "Object", + "TopDownMovement" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Button_pressed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Down\"", - "\"Left\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateDownKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyDirectionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "8" ] } ] @@ -12431,427 +19750,721 @@ "conditions": [ { "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseLeftStick" + "inverted": true, + "value": "TopDownMovementBehavior::DiagonalsAllowed" }, "parameters": [ "Object", - "Behavior" + "TopDownMovement" ] } ], - "actions": [], - "events": [ + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Analog\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateStick" - }, - "parameters": [ - "Object", - "TopDownMovement", - "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", - "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")" - ] - } + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyDirectionCount" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "4" ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"360°\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateStick" - }, - "parameters": [ - "Object", - "TopDownMovement", - "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Left\")", - "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Left\"))" - ] - } + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "onActivate", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::Direction()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPostEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::Speed" + }, + "parameters": [ + "Object", + "TopDownMovement", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PauseAnimation" + }, + "parameters": [ + "Object" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementBehavior::Speed" + }, + "parameters": [ + "Object", + "TopDownMovement", + ">", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "PlayAnimation" + }, + "parameters": [ + "Object" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyIsScalingAnimation" + }, + "parameters": [ + "Object", + "Behavior" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"8 Directions\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Left\"", - "\"Left\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateLeftKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Left\"", - "\"Right\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateRightKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Left\"", - "\"Up\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateUpKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Left\"", - "\"Down\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateDownKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - } + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationSpeedScale" + }, + "parameters": [ + "Object", + "Behavior", + "" ] } ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetSharedPropertyNewAnimationDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Behavior::Direction()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Use a small margin is used to avoid to flicker between 2 directions." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::CompareNumbers" + }, + "parameters": [ + "abs(Object.Behavior::DirectionDifference(Object.Behavior::SharedPropertyNewAnimationDirection(), Object.Behavior::PropertyAnimationDirection()))", + ">", + "0.5 + 0.03125" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" + }, + "parameters": [ + "Object", + "Behavior", + "Object.Behavior::SharedPropertyNewAnimationDirection()", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the animation name of the object.", + "fullName": "Animation name", + "functionType": "ExpressionAndCondition", + "name": "AnimationName", + "sentence": "the animation name", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnString" + }, + "parameters": [ + "Object.Behavior::PropertyAnimationName()" + ] + } + ] + } + ], + "expressionType": { + "type": "string" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "AnimationName", + "name": "SetAnimationName", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "GetArgumentAsString(\"Value\")" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyAnimationName" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "GetArgumentAsString(\"Value\")" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object.Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the animation is scaled according to speed.", + "fullName": "Scale animation according to speed", + "functionType": "Condition", + "name": "IsScalingAnimation", + "sentence": "_PARAM0_ animation is scaled according to speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyIsScalingAnimation" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Change whether the animation is scaled according to speed or not.", + "fullName": "Scale animation according to speed", + "functionType": "Action", + "name": "SetIsScalingAnimation", + "sentence": "Scale the animation of _PARAM0_ according to speed: _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyIsScalingAnimation" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + }, + { + "type": { + "value": "ChangeAnimationSpeedScale" + }, + "parameters": [ + "Object", + "=", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyIsScalingAnimation" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::PlatformerGamepadMapper::PropertyUseRightStick" - }, - "parameters": [ - "Object", - "Behavior" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"Analog\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateStick" - }, - "parameters": [ - "Object", - "TopDownMovement", - "Gamepads::StickRotationValue(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")", - "Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\")" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"360°\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateStick" - }, - "parameters": [ - "Object", - "TopDownMovement", - "sign(Gamepads::StickForce(Object.Behavior::PropertyGamepadIdentifier(), \"Right\"))", - "1" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::TopDownGamepadMapper::PropertyStickMode" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "\"8 Directions\"" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Left\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateLeftKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Right\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateRightKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Up\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateUpKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "Gamepads::C_Axis_pushed" - }, - "parameters": [ - "", - "Object.Behavior::PropertyGamepadIdentifier()", - "\"Right\"", - "\"Down\"", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementBehavior::SimulateDownKey" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ] - } - ] - } + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationSpeedScale" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsScalingAnimation", + "name": "Value", + "optional": true, + "type": "yesorno" + } + ], + "objectGroups": [] + }, + { + "description": "Change the animation speed scale according to the object speed.", + "fullName": "Animation speed scale", + "functionType": "Action", + "name": "SetAnimationSpeedScale", + "private": true, + "sentence": "Change the animation speed scale according to _PARAM0_ speed", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ChangeAnimationSpeedScale" + }, + "parameters": [ + "Object", + "=", + "Object.TopDownMovement::Speed() / Object.TopDownMovement::MaxSpeed()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the object movement direction.", + "fullName": "Direction", + "functionType": "Expression", + "name": "Direction", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "(Object.TopDownMovement::Angle() + Object.Behavior::PropertyAngleOffset()) * Object.Behavior::PropertyDirectionCount() / 360" + ] + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Return the difference between 2 directions.", + "fullName": "Direction dirrerence", + "functionType": "Expression", + "name": "DirectionDifference", + "private": true, + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetReturnNumber" + }, + "parameters": [ + "mod(mod(GetArgumentAsNumber(\"Direction\") - GetArgumentAsNumber(\"OtherDirection\"), Object.Behavior::PropertyDirectionCount()) + Object.Behavior::PropertyDirectionCount() / 2, Object.Behavior::PropertyDirectionCount()) - Object.Behavior::PropertyDirectionCount() / 2" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", + "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Gamepads::TopDownGamepadMapper", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "type": "behavior" + }, + { + "description": "Direction", + "name": "Direction", + "type": "expression" + }, + { + "description": "Other direction", + "name": "OtherDirection", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Change the animation direction of the object.", + "fullName": "Animation direction", + "functionType": "Action", + "name": "SetAnimationDirection", + "private": true, + "sentence": "Change the animation direction of _PARAM0_ to _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Change the animation but keep the current frame number." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyAnimationDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "mod(mod(round(GetArgumentAsNumber(\"Value\")), Object.Behavior::PropertyDirectionCount()) + Object.Behavior::PropertyDirectionCount(), Object.Behavior::PropertyDirectionCount())" + ] + }, + { + "type": { + "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetSharedPropertyAnimationFrame" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Sprite()" + ] + }, + { + "type": { + "value": "SetAnimationName" + }, + "parameters": [ + "Object", + "Object. Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())" + ] + }, + { + "type": { + "value": "ChangeSprite" + }, + "parameters": [ + "Object", + "=", + "Object.Behavior::SharedPropertyAnimationFrame()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "supplementaryInformation": "Sprite", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", "type": "behavior" + }, + { + "description": "Value", + "name": "Value", + "type": "expression" } ], "objectGroups": [] @@ -12861,184 +20474,245 @@ { "value": "", "type": "Behavior", - "label": "Top-down movement behavior", + "label": "Top-down movement", "description": "", "group": "", "extraInformation": [ "TopDownMovementBehavior::TopDownMovementBehavior" ], - "hidden": false, "name": "TopDownMovement" }, { - "value": "1", - "type": "Number", - "label": "Gamepad identifier (1, 2, 3 or 4)", + "value": "true", + "type": "Boolean", + "label": "Scale animation according to speed", "description": "", - "group": "", + "group": "Animation", "extraInformation": [], - "hidden": false, - "name": "GamepadIdentifier" + "name": "IsScalingAnimation" }, { - "value": "true", - "type": "Boolean", - "label": "Use directional pad", - "description": "", - "group": "Controls", + "value": "Walk", + "type": "String", + "label": "Animation name", + "description": "Animations must be called \"Walk0\", \"Walk1\"... for left, down...", + "group": "Animation", "extraInformation": [], - "hidden": false, - "name": "UseArrows" + "name": "AnimationName" }, { - "value": "true", - "type": "Boolean", - "label": "Use left stick", - "description": "", - "group": "Controls", + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "Number of directions", + "description": "Leave to 0 to automatically use 8 when diagonals are allowed and 4 otherwise.", + "group": "Direction", "extraInformation": [], - "hidden": false, - "name": "UseLeftStick" + "name": "DirectionCount" }, { - "value": "", - "type": "Boolean", - "label": "Use right stick", - "description": "", - "group": "Controls", + "value": "0", + "type": "Number", + "unit": "DegreeAngle", + "label": "Angle offset", + "description": "Set to 90°, \"Walk0\" becomes the animation for down.", + "group": "Direction", "extraInformation": [], - "hidden": false, - "name": "UseRightStick" + "name": "AngleOffset" }, { - "value": "Analog", - "type": "Choice", - "label": "Stick mode", + "value": "0", + "type": "Number", + "label": "", "description": "", - "group": "Controls", - "extraInformation": [ - "Analog", - "360°", - "8 Directions" - ], - "hidden": false, - "name": "StickMode" + "group": "", + "extraInformation": [], + "hidden": true, + "name": "AnimationDirection" } ], - "sharedPropertyDescriptors": [] + "sharedPropertyDescriptors": [ + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "NewAnimationDirection" + }, + { + "value": "0", + "type": "Number", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "AnimationFrame" + } + ] } ], "eventsBasedObjects": [] }, { "author": "", - "category": "Movement", + "category": "", "extensionNamespace": "", - "fullName": "Top-down movement animator", + "fullName": "", "helpPath": "", - "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBkPSJNNiwyMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNsLTQtNC4xYy0wLjQtMC40LTAuNC0xLDAtMS40bDQtNC4xYzAuNC0wLjQsMS0wLjQsMS40LDBzMC40LDEsMCwxLjRMMy40LDE2bDMuMywzLjMNCgkJYzAuNCwwLjQsMC40LDEsMCwxLjRDNi42LDIxLDYuMywyMS4xLDYsMjEuMXoiLz4NCjwvZz4NCjxnPg0KCTxwYXRoIGQ9Ik0yNiwyMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNjLTAuNC0wLjQtMC40LTEsMC0xLjRsMy4zLTMuM2wtMy4zLTMuM2MtMC40LTAuNC0wLjQtMSwwLTEuNHMxLTAuNCwxLjQsMGw0LjEsNC4xDQoJCWMwLjIsMC4yLDAuMywwLjQsMC4zLDAuN3MtMC4xLDAuNS0wLjMsMC43bC00LjEsNC4xQzI2LjYsMjEsMjYuMywyMS4xLDI2LDIxLjF6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMTYsMzEuMUwxNiwzMS4xYy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNsLTQtNC4xYy0wLjQtMC40LTAuNC0xLDAtMS40czEtMC40LDEuNCwwbDMuMywzLjNsMy4zLTMuM2MwLjQtMC40LDEtMC40LDEuNCwwDQoJCXMwLjQsMSwwLDEuNGwtNC4xLDQuMUMxNi42LDMwLjksMTYuMywzMS4xLDE2LDMxLjF6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMjAuMSw3Yy0wLjMsMC0wLjUtMC4xLTAuNy0wLjNMMTYsMy40bC0zLjMsMy4zYy0wLjQsMC40LTEsMC40LTEuNCwwcy0wLjQtMSwwLTEuNGw0LTQuMWMwLjQtMC40LDEtMC40LDEuNCwwbDQuMSw0LjENCgkJYzAuNCwwLjQsMC40LDEsMCwxLjRDMjAuNiw2LjksMjAuNCw3LDIwLjEsN3oiLz4NCjwvZz4NCjxnPg0KCTxwYXRoIGQ9Ik0xNiwzMGMtMC42LDAtMS0wLjQtMS0xVjNjMC0wLjYsMC40LTEsMS0xczEsMC40LDEsMXYyNkMxNywyOS42LDE2LjYsMzAsMTYsMzB6Ii8+DQo8L2c+DQo8Zz4NCgk8cGF0aCBkPSJNMjksMTdIMmMtMC42LDAtMS0wLjQtMS0xczAuNC0xLDEtMWgyN2MwLjYsMCwxLDAuNCwxLDFTMjkuNiwxNywyOSwxN3oiLz4NCjwvZz4NCjwvc3ZnPg0K", - "name": "TopDownMovementAnimator", - "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Arrows/a6026156355ae5f03613b03971e4ddb50d0c95b8901e7a21edc57f33f0032e42_Arrows_thin_arrows_all_directions_cross.svg", - "shortDescription": "Change the animation according to the movement direction.", - "version": "0.1.1", - "description": "Change the animation according to the movement direction.", - "origin": { - "identifier": "TopDownMovementAnimator", - "name": "gdevelop-extension-store" - }, + "iconUrl": "", + "name": "Respawn", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", "tags": [ - "top-down", - "animation", - "direction" - ], - "authorIds": [ - "IWykYNRvhCZBN3vEgKEbBPOR3Oc2" + "" ], + "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { - "description": "Change the animation according to the movement direction.", - "fullName": "Top-down movement animator", - "name": "TopDownMovementAnimator", - "objectType": "Sprite", + "description": "Make the object come back to its initial location", + "fullName": "Respawn", + "name": "Respawn", + "objectType": "", "eventsFunctions": [ { - "fullName": "", + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Respawn::Respawn::SetPropertyOriginX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "Respawn::Respawn::SetPropertyOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Respawn::Respawn", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Respawn to its initial location", + "fullName": "Respawn", "functionType": "Action", - "name": "onCreated", - "sentence": "", + "name": "Respawn", + "sentence": "_PARAM0_ respawns to its initial location", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyDirectionCount" + "value": "MettreXY" }, "parameters": [ "Object", - "Behavior", "=", - "0" + "OriginX", + "=", + "OriginY" + ] + }, + { + "type": { + "value": "ResetObjectTimer" + }, + "parameters": [ + "Object", + "\"Invincible\"" ] } - ], - "actions": [], - "events": [ + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Respawn::Respawn", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the object is invincible.", + "fullName": "Is the object invincible?", + "functionType": "Condition", + "name": "IsInvincible", + "sentence": "_PARAM0_ is invincible", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "TopDownMovementBehavior::DiagonalsAllowed" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyDirectionCount" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "8" - ] - } + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Invincible\"", + ">=", + "0" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "inverted": true, - "value": "TopDownMovementBehavior::DiagonalsAllowed" - }, - "parameters": [ - "Object", - "TopDownMovement" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyDirectionCount" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "4" - ] - } + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" ] } ] @@ -13048,13 +20722,12 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Respawn::Respawn", "type": "behavior" } ], @@ -13063,22 +20736,32 @@ { "fullName": "", "functionType": "Action", - "name": "onActivate", + "name": "doStepPreEvents", "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "value": "CompareObjectTimer" + }, + "parameters": [ + "Object", + "\"Invincible\"", + ">=", + "InvincibilityTime" + ] + } + ], "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" + "value": "RemoveObjectTimer" }, "parameters": [ "Object", - "Behavior", - "Object.Behavior::Direction()", - "" + "\"Invincible\"" ] } ] @@ -13088,13 +20771,12 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Respawn::Respawn", "type": "behavior" } ], @@ -13111,161 +20793,296 @@ "conditions": [ { "type": { - "value": "TopDownMovementBehavior::Speed" + "value": "DepartScene" }, "parameters": [ - "Object", - "TopDownMovement", - "=", - "0" + "" ] } ], "actions": [ { "type": { - "value": "PauseAnimation" + "value": "Respawn::Respawn::SetPropertyOriginX" }, "parameters": [ - "Object" + "Object", + "Behavior", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "Respawn::Respawn::SetPropertyOriginY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "Object.Y()" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Respawn::Respawn", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "5", + "type": "Number", + "unit": "Second", + "label": "The invincibility time after been respawn (in seconds).", + "description": "", + "group": "", + "extraInformation": [], + "name": "InvincibilityTime" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OriginX" + }, + { + "value": "0", + "type": "Number", + "unit": "Pixel", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "OriginY" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] + }, + { + "author": "", + "category": "", + "extensionNamespace": "", + "fullName": "", + "helpPath": "", + "iconUrl": "", + "name": "Bomb", + "previewIconUrl": "", + "shortDescription": "", + "version": "", + "description": "", + "tags": [], + "authorIds": [], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [ + { + "description": "Explode a bomb into 4 lines of Explosion objects.", + "fullName": "Explode bomb by chain reaction", + "functionType": "Action", + "name": "ExplodeByChainReaction", + "sentence": "_PARAM1_ in contact with _PARAM3_ explode and is stopped by _PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ { "type": { - "value": "TopDownMovementBehavior::Speed" + "value": "BooleanVariable" }, "parameters": [ - "Object", - "TopDownMovement", - ">", - "0" + "HasNewBombExploded", + "True", + "" ] } ], + "conditions": [], "actions": [ { "type": { - "value": "PlayAnimation" + "value": "SetBooleanVariable" }, "parameters": [ - "Object" + "HasNewBombExploded", + "False", + "" ] } ], "events": [ { - "type": "BuiltinCommonInstructions::Standard", + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "TODO Remove the IsDeleted variable when deleted object are taken into account inside a function." + }, + { + "type": "BuiltinCommonInstructions::ForEach", + "object": "Bomb", "conditions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyIsScalingAnimation" + "value": "CollisionNP" }, "parameters": [ - "Object", - "Behavior" + "Explosion", + "Bomb", + "", + "", + "" + ] + }, + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsDeleted", + "" ] } ], "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationSpeedScale" + "value": "AjoutObjConcern" }, "parameters": [ - "Object", - "Behavior", + "", + "Explosion" + ] + }, + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsDeleted", + "True" + ] + }, + { + "type": { + "value": "Bomb::BombBehavior::Explode" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "ExplosionParticleEmitter", + "" + ] + }, + { + "type": { + "value": "SetBooleanVariable" + }, + "parameters": [ + "HasNewBombExploded", + "True", "" ] } ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetSharedPropertyNewAnimationDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Behavior::Direction()" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Use a small margin is used to avoid to flicker between 2 directions." - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "BuiltinCommonInstructions::CompareNumbers" - }, - "parameters": [ - "abs(Object.Behavior::DirectionDifference(Object.Behavior::SharedPropertyNewAnimationDirection(), Object.Behavior::PropertyAnimationDirection()))", - ">", - "0.5 + 0.03125" - ] - } - ], - "actions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" - }, - "parameters": [ - "Object", - "Behavior", - "Object.Behavior::SharedPropertyNewAnimationDirection()", - "" - ] - } - ] } ], - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" - }, + "variables": [ { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", - "type": "behavior" + "folded": true, + "name": "HasNewBombExploded", + "type": "boolean", + "value": true } - ], - "objectGroups": [] + ] + } + ], + "parameters": [ + { + "description": "Bomb", + "name": "Bomb", + "type": "objectList" }, { - "description": "the animation name of the object.", - "fullName": "Animation name", - "functionType": "ExpressionAndCondition", - "name": "AnimationName", - "sentence": "the animation name", + "description": "Bomb behavior", + "name": "BombBehavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" + }, + { + "description": "Explosion", + "name": "Explosion", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Explosion", + "name": "ExplosionBehavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", + "type": "behavior" + }, + { + "description": "Obstacle", + "name": "Obstacle", + "type": "objectList" + } + ], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [ + { + "description": "", + "fullName": "", + "name": "BombBehavior", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13273,75 +21090,61 @@ "actions": [ { "type": { - "value": "SetReturnString" + "value": "ResetObjectTimer" }, "parameters": [ - "Object.Behavior::PropertyAnimationName()" + "Object", + "\"Detonator\"" ] } ] } ], - "expressionType": { - "type": "string" - }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Bomb::BombBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "ActionWithOperator", - "getterName": "AnimationName", - "name": "SetAnimationName", - "sentence": "", + "fullName": "Initialize a bomb", + "functionType": "Action", + "name": "Initialize", + "sentence": "Initialize _PARAM0_ for player: _PARAM2_ and range: _PARAM3_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyAnimationName" - }, - "parameters": [ - "Object", - "Behavior", - "!=", - "GetArgumentAsString(\"Value\")" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyAnimationName" + "value": "Bomb::BombBehavior::SetPropertyPlayerId" }, "parameters": [ "Object", "Behavior", "=", - "GetArgumentAsString(\"Value\")" + "PlayerId" ] }, { "type": { - "value": "SetAnimationName" + "value": "Bomb::BombBehavior::SetPropertyExplosionRange" }, "parameters": [ "Object", - "Object.Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())" + "Behavior", + "=", + "Range" ] } ] @@ -13351,35 +21154,46 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Bomb::BombBehavior", "type": "behavior" + }, + { + "description": "Player id", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Range", + "name": "Range", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the animation is scaled according to speed.", - "fullName": "Scale animation according to speed", + "fullName": "Is ready to explode", "functionType": "Condition", - "name": "IsScalingAnimation", - "sentence": "_PARAM0_ animation is scaled according to speed", + "name": "IsReadyToExplode", + "sentence": "_PARAM0_ is ready to explode", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::PropertyIsScalingAnimation" + "value": "CompareObjectTimer" }, "parameters": [ "Object", - "Behavior" + "\"Detonator\"", + ">=", + "Delay" ] } ], @@ -13399,93 +21213,428 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Bomb::BombBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Change whether the animation is scaled according to speed or not.", - "fullName": "Scale animation according to speed", + "description": "Explode a bomb into 4 lines of Explosion objects.", + "fullName": "Explode a bomb", "functionType": "Action", - "name": "SetIsScalingAnimation", - "sentence": "Scale the animation of _PARAM0_ according to speed: _PARAM2_", + "name": "Explode", + "sentence": "_PARAM0_ explode into _PARAM2_ and is stopped by _PARAM4_", "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Creation of the central explosion square" + }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "inverted": true, - "value": "GetArgumentAsBoolean" + "value": "Create" }, "parameters": [ - "\"Value\"" + "", + "Explosion", + "Object.X()", + "Object.Y()", + "\"\"" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Explosion", + "=", + "Explosion.Y() + 12" + ] + }, + { + "type": { + "value": "Bomb::ExplosionBehavior::Inizialize" + }, + "parameters": [ + "Explosion", + "ExplosionBehavior", + "PlayerId", + "0", + "0", + "" ] } - ], + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Creation of the explosion squares on the 4 directions" + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyIsScalingAnimation" + "value": "Bomb::BombBehavior::CreateExplosionArm" }, "parameters": [ "Object", "Behavior", - "no" + "Explosion", + "ExplosionBehavior", + "Obstacle", + "0", + "1", + "0", + "0" ] }, { "type": { - "value": "ChangeAnimationSpeedScale" + "value": "Bomb::BombBehavior::CreateExplosionArm" }, "parameters": [ "Object", - "=", + "Behavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "180", + "-1", + "0", + "0" + ] + }, + { + "type": { + "value": "Bomb::BombBehavior::CreateExplosionArm" + }, + "parameters": [ + "Object", + "Behavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "90", + "0", + "1", "1" ] + }, + { + "type": { + "value": "Bomb::BombBehavior::CreateExplosionArm" + }, + "parameters": [ + "Object", + "Behavior", + "Explosion", + "ExplosionBehavior", + "Obstacle", + "-90", + "0", + "-1", + "-1" + ] } ] }, { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "conditions": [], + "actions": [ { "type": { - "value": "GetArgumentAsBoolean" + "value": "Delete" }, "parameters": [ - "\"Value\"" + "Object", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" + }, + { + "description": "Explosion", + "name": "Explosion", + "supplementaryInformation": "Sprite", + "type": "objectList" + }, + { + "description": "Explosion", + "name": "ExplosionBehavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", + "type": "behavior" + }, + { + "description": "Obstacle", + "name": "Obstacle", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Create one line of Explosion object in a given direction.", + "fullName": "Create an explosion arm", + "functionType": "Action", + "name": "CreateExplosionArm", + "private": true, + "sentence": "Create an explosion arm with _PARAM2_ from _PARAM0_ to _PARAM4_ in the direction _PARAM5_° (_PARAM6_ ; _PARAM7_)", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "infiniteLoopWarning": true, + "type": "BuiltinCommonInstructions::While", + "whileConditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Iteration", + "<=", + "ExplosionRange" + ] + } + ], + "conditions": [], + "actions": [ + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Explosion", + "Object.X() + ExplosionDirectionX * 48 * Iteration", + "Object.Y() + ExplosionDirectionY * 48 * Iteration", + "\"\"" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Explosion", + "=", + "ExplosionDirection" + ] + }, + { + "type": { + "value": "Bomb::ExplosionBehavior::Inizialize" + }, + "parameters": [ + "Explosion", + "ExplosionBehavior", + "PlayerId", + "ExplosionDirectionX", + "ExplosionDirectionY", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The arm squares (+11) are over the finger squares (+10) and the center squares are over the other 2 (+12). It makes a better continuity on the explosions sprites." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Iteration", + "<", + "ExplosionRange" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Explosion", + "Animation", + "=", + "\"ExplosionArm\"" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Explosion", + "=", + "Explosion.Y() + 11" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "NumberVariable" + }, + "parameters": [ + "Iteration", + "=", + "ExplosionRange" + ] + } + ], + "actions": [ + { + "type": { + "value": "AnimatableCapability::AnimatableBehavior::SetName" + }, + "parameters": [ + "Explosion", + "Animation", + "=", + "\"ExplosionFinger\"" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Explosion", + "=", + "Explosion.Y() + 10" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "When an obstacle is reached, the loop is broken (by setting a big value in the iteration variable)." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "CollisionNP" + }, + "parameters": [ + "Explosion", + "Obstacle", + "", + "", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Iteration", + "=", + "666" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Iteration", + "+", + "1" + ] + } + ] + } ] } ], - "actions": [ - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyIsScalingAnimation" - }, - "parameters": [ - "Object", - "Behavior", - "yes" - ] - }, + "variables": [ { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationSpeedScale" - }, - "parameters": [ - "Object", - "Behavior", - "" - ] + "folded": true, + "name": "Iteration", + "type": "number", + "value": 1 } ] } @@ -13494,245 +21643,86 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "supplementaryInformation": "Bomb::BombBehavior", "type": "behavior" }, { - "defaultValue": "yes", - "description": "IsScalingAnimation", - "name": "Value", - "optional": true, - "type": "yesorno" - } - ], - "objectGroups": [] - }, - { - "description": "Change the animation speed scale according to the object speed.", - "fullName": "Animation speed scale", - "functionType": "Action", - "name": "SetAnimationSpeedScale", - "private": true, - "sentence": "Change the animation speed scale according to _PARAM0_ speed", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ChangeAnimationSpeedScale" - }, - "parameters": [ - "Object", - "=", - "Object.TopDownMovement::Speed() / Object.TopDownMovement::MaxSpeed()" - ] - } - ] - } - ], - "parameters": [ - { - "description": "Object", - "name": "Object", + "description": "Explosion", + "name": "Explosion", "supplementaryInformation": "Sprite", - "type": "object" + "type": "objectList" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", + "description": "Explosion", + "name": "ExplosionBehavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the object movement direction.", - "fullName": "Direction", - "functionType": "Expression", - "name": "Direction", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "(Object.TopDownMovement::Angle() + Object.Behavior::PropertyAngleOffset()) * Object.Behavior::PropertyDirectionCount() / 360" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", - "type": "behavior" - } - ], - "objectGroups": [] - }, - { - "description": "Return the difference between 2 directions.", - "fullName": "Direction dirrerence", - "functionType": "Expression", - "name": "DirectionDifference", - "private": true, - "sentence": "", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "SetReturnNumber" - }, - "parameters": [ - "mod(mod(GetArgumentAsNumber(\"Direction\") - GetArgumentAsNumber(\"OtherDirection\"), Object.Behavior::PropertyDirectionCount()) + Object.Behavior::PropertyDirectionCount() / 2, Object.Behavior::PropertyDirectionCount()) - Object.Behavior::PropertyDirectionCount() / 2" - ] - } - ] - } - ], - "expressionType": { - "type": "expression" - }, - "parameters": [ - { - "description": "Object", - "name": "Object", - "supplementaryInformation": "Sprite", - "type": "object" + "description": "Obstacle", + "name": "Obstacle", + "type": "objectList" }, { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", - "type": "behavior" + "description": "Explosion direction angle", + "name": "ExplosionDirection", + "type": "expression" }, { - "description": "Direction", - "name": "Direction", + "description": "Explosion direction X", + "name": "ExplosionDirectionX", "type": "expression" }, { - "description": "Other direction", - "name": "OtherDirection", + "description": "Explosion direction Y", + "name": "ExplosionDirectionY", "type": "expression" } ], "objectGroups": [] }, { - "description": "Change the animation direction of the object.", - "fullName": "Animation direction", - "functionType": "Action", - "name": "SetAnimationDirection", - "private": true, - "sentence": "Change the animation direction of _PARAM0_ to _PARAM2_", + "description": "the player id of the object.", + "fullName": "Player id", + "functionType": "ExpressionAndCondition", + "group": "BombBehavior configuration", + "name": "PlayerId", + "sentence": "the player id", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Change the animation but keep the current frame number." - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetPropertyAnimationDirection" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "mod(mod(round(GetArgumentAsNumber(\"Value\")), Object.Behavior::PropertyDirectionCount()) + Object.Behavior::PropertyDirectionCount(), Object.Behavior::PropertyDirectionCount())" - ] - }, - { - "type": { - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetSharedPropertyAnimationFrame" - }, - "parameters": [ - "Object", - "Behavior", - "=", - "Object.Sprite()" - ] - }, - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "Object", - "Object. Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())" - ] - }, - { - "type": { - "value": "ChangeSprite" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "=", - "Object.Behavior::SharedPropertyAnimationFrame()" + "PlayerId" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, - { - "description": "Behavior", - "name": "Behavior", - "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", - "type": "behavior" - }, - { - "description": "Value", - "name": "Value", - "type": "expression" + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" } ], "objectGroups": [] @@ -13740,119 +21730,44 @@ ], "propertyDescriptors": [ { - "value": "", - "type": "Behavior", - "label": "Top-down movement", + "value": "3", + "type": "Number", + "unit": "Second", + "label": "Delay", "description": "", "group": "", - "extraInformation": [ - "TopDownMovementBehavior::TopDownMovementBehavior" - ], - "hidden": false, - "name": "TopDownMovement" - }, - { - "value": "true", - "type": "Boolean", - "label": "Scale animation according to speed", - "description": "", - "group": "Animation", - "extraInformation": [], - "hidden": false, - "name": "IsScalingAnimation" - }, - { - "value": "Walk", - "type": "String", - "label": "Animation name", - "description": "Animations must be called \"Walk0\", \"Walk1\"... for left, down...", - "group": "Animation", "extraInformation": [], - "hidden": false, - "name": "AnimationName" + "name": "Delay" }, { "value": "0", "type": "Number", "unit": "Dimensionless", - "label": "Number of directions", - "description": "Leave to 0 to automatically use 8 when diagonals are allowed and 4 otherwise.", - "group": "Direction", - "extraInformation": [], - "hidden": false, - "name": "DirectionCount" - }, - { - "value": "0", - "type": "Number", - "unit": "DegreeAngle", - "label": "Angle offset", - "description": "Set to 90°, \"Walk0\" becomes the animation for down.", - "group": "Direction", - "extraInformation": [], - "hidden": false, - "name": "AngleOffset" - }, - { - "value": "0", - "type": "Number", - "label": "", - "description": "", - "group": "", - "extraInformation": [], - "hidden": true, - "name": "AnimationDirection" - } - ], - "sharedPropertyDescriptors": [ - { - "value": "0", - "type": "Number", - "label": "", + "label": "Player id", "description": "", "group": "", "extraInformation": [], "hidden": true, - "name": "NewAnimationDirection" + "name": "PlayerId" }, { - "value": "0", + "value": "2", "type": "Number", + "unit": "Dimensionless", "label": "", "description": "", "group": "", "extraInformation": [], "hidden": true, - "name": "AnimationFrame" + "name": "ExplosionRange" } - ] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "", - "helpPath": "", - "iconUrl": "", - "name": "Respawn", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "", - "tags": [ - "" - ], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [], - "eventsBasedBehaviors": [ + ], + "sharedPropertyDescriptors": [] + }, { - "description": "Make the object come back to its initial location", - "fullName": "Respawn", - "name": "Respawn", + "description": "", + "fullName": "", + "name": "ExplosionBehavior", "objectType": "", "eventsFunctions": [ { @@ -13867,24 +21782,11 @@ "actions": [ { "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "OriginY", - "=", - "Object.Y()" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "ResetObjectTimer" }, "parameters": [ "Object", - "OriginX", - "=", - "Object.X()" + "\"LifeTime\"" ] } ] @@ -13899,18 +21801,17 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Respawn::Respawn", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Respawn to its initial location", - "fullName": "Respawn", + "fullName": "Inizialize an explosion part", "functionType": "Action", - "name": "respawn", - "sentence": "_PARAM0_ respawns to its initial location", + "name": "Inizialize", + "sentence": "Initialize _PARAM0_ for player: _PARAM2_ and direction: _PARAM3_ ; _PARAM4_", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -13918,43 +21819,35 @@ "actions": [ { "type": { - "value": "MettreXY" + "value": "Bomb::ExplosionBehavior::SetPropertyPlayerId" }, "parameters": [ "Object", + "Behavior", "=", - "Object.Variable(OriginX)", - "=", - "Object.Variable(OriginY)" + "PlayerId" ] }, { "type": { - "value": "ModVarObjet" + "value": "Bomb::ExplosionBehavior::SetPropertyDirectionX" }, "parameters": [ "Object", - "Invincible", + "Behavior", "=", - "1" - ] - }, - { - "type": { - "value": "ResetObjectTimer" - }, - "parameters": [ - "Object", - "\"Invincible\"" + "DirectionX" ] }, { "type": { - "value": "UnPauseObjectTimer" + "value": "Bomb::ExplosionBehavior::SetPropertyDirectionY" }, "parameters": [ "Object", - "\"Invincible\"" + "Behavior", + "=", + "DirectionY" ] } ] @@ -13969,30 +21862,44 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Respawn::Respawn", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" + }, + { + "description": "Player id", + "name": "PlayerId", + "type": "expression" + }, + { + "description": "Direction X", + "name": "DirectionX", + "type": "expression" + }, + { + "description": "Direction Y", + "name": "DirectionY", + "type": "expression" } ], "objectGroups": [] }, { - "description": "Check if the object is invincible.", - "fullName": "Is the object invincible?", - "functionType": "Condition", - "name": "isInvincible", - "sentence": "_PARAM0_ is invincible", + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "VarObjet" + "value": "CompareObjectTimer" }, "parameters": [ "Object", - "Invincible", - "=", + "\"LifeTime\"", + ">", "1" ] } @@ -14000,10 +21907,11 @@ "actions": [ { "type": { - "value": "SetReturnBoolean" + "value": "Delete" }, "parameters": [ - "True" + "Object", + "" ] } ] @@ -14018,103 +21926,128 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Respawn::Respawn", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "fullName": "Has just been created", + "functionType": "Condition", + "name": "HasJustBeenCreated", + "sentence": "_PARAM0_ has just been created", "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "DepartScene" + "inverted": true, + "value": "CompareObjectTimer" }, "parameters": [ - "" + "Object", + "\"LifeTime\"", + ">", + "0" ] } ], "actions": [ { "type": { - "value": "PauseObjectTimer" - }, - "parameters": [ - "Object", - "\"Invincible\"" - ] - }, - { - "type": { - "value": "ResetObjectTimer" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "\"Invincible\"" + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the playerId of the object.", + "fullName": "PlayerId", + "functionType": "ExpressionAndCondition", + "group": "ExplosionBehavior configuration", + "name": "PlayerId", + "sentence": "the playerId", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "ObjectTimer" - }, - "parameters": [ - "Object", - "\"Invincible\"", - "Object.Behavior::PropertyInvincibilityTime()" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "Invincible", - "=", - "0" - ] - }, - { - "type": { - "value": "PauseObjectTimer" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "\"Invincible\"" + "PlayerId" ] - }, + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Bomb::ExplosionBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the directionX of the object.", + "fullName": "DirectionX", + "functionType": "ExpressionAndCondition", + "group": "ExplosionBehavior configuration", + "name": "DirectionX", + "sentence": "the directionX", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ResetObjectTimer" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "\"Invincible\"" + "DirectionX" ] } ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -14124,56 +22057,38 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Respawn::Respawn", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "fullName": "", - "functionType": "Action", - "name": "doStepPostEvents", - "sentence": "", + "description": "the directionY of the object.", + "fullName": "DirectionY", + "functionType": "ExpressionAndCondition", + "group": "ExplosionBehavior configuration", + "name": "DirectionY", + "sentence": "the directionY", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "DepartScene" - }, - "parameters": [ - "" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" - }, - "parameters": [ - "Object", - "OriginY", - "=", - "Object.Y()" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "OriginX", - "=", - "Object.X()" + "DirectionY" ] } ] } ], + "expressionType": { + "type": "expression" + }, "parameters": [ { "description": "Object", @@ -14183,7 +22098,7 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Respawn::Respawn", + "supplementaryInformation": "Bomb::ExplosionBehavior", "type": "behavior" } ], @@ -14192,14 +22107,37 @@ ], "propertyDescriptors": [ { - "value": "5", + "value": "0", "type": "Number", - "label": "The invincibility time after been respawn (in seconds).", + "unit": "Dimensionless", + "label": "", "description": "", "group": "", "extraInformation": [], - "hidden": false, - "name": "InvincibilityTime" + "hidden": true, + "name": "PlayerId" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DirectionX" + }, + { + "value": "0", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DirectionY" } ], "sharedPropertyDescriptors": [] @@ -14214,7 +22152,7 @@ "fullName": "", "helpPath": "", "iconUrl": "", - "name": "BombExplosion", + "name": "Player", "previewIconUrl": "", "shortDescription": "", "version": "", @@ -14222,26 +22160,16 @@ "tags": [], "authorIds": [], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [ { - "description": "Explode a bombe into 4 lines of Explosion objects.", - "fullName": "Explode a bombe", + "description": "Create a bonus at specified position.", + "fullName": "Create bonus", "functionType": "Action", - "name": "Explode", - "sentence": "_PARAM1_ explode into _PARAM2_ and is stopped by _PARAM3_", + "name": "CreateBonus", + "sentence": "Create _PARAM1_ of type _PARAM4_ at position _PARAM2_ ; _PARAM3_", "events": [ - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Creation of the central explosion square" - }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [], @@ -14252,10 +22180,10 @@ }, "parameters": [ "", - "Explosion", - "Bomb.X()", - "Bomb.Y()", - "\"\"" + "Bonus", + "PositionX", + "PositionY", + "" ] }, { @@ -14263,113 +22191,42 @@ "value": "ChangePlan" }, "parameters": [ - "Explosion", + "Bonus", "=", - "Explosion.Y() + 12" + "Bonus.Y() + 10" ] }, { "type": { - "value": "ModVarObjet" + "value": "ResizableCapability::ResizableBehavior::SetHeight" }, "parameters": [ - "Explosion", - "PlayerNum", + "Bonus", + "Resizable", "=", - "Bomb.Variable(PlayerNum)" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "Creation of the explosion squares on the 4 directions" - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "BombExplosion::CreateExplosionArm" - }, - "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "0", - "1", - "0", - "" - ] - }, - { - "type": { - "value": "BombExplosion::CreateExplosionArm" - }, - "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "180", - "-1", - "0", - "" + "48" ] }, { "type": { - "value": "BombExplosion::CreateExplosionArm" + "value": "ResizableCapability::ResizableBehavior::SetWidth" }, "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "90", - "0", - "1", - "" + "Bonus", + "Resizable", + "=", + "48" ] }, { "type": { - "value": "BombExplosion::CreateExplosionArm" - }, - "parameters": [ - "", - "Bomb", - "Explosion", - "Obstacle", - "-90", - "0", - "-1", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Delete" + "value": "AnimatableCapability::AnimatableBehavior::SetName" }, "parameters": [ - "Bomb", - "" + "Bonus", + "Animation", + "=", + "Type" ] } ] @@ -14377,85 +22234,176 @@ ], "parameters": [ { - "description": "Bomb", - "name": "Bomb", + "description": "Bonus", + "name": "Bonus", + "supplementaryInformation": "Sprite", "type": "objectList" }, { - "description": "Explosion", - "name": "Explosion", - "supplementaryInformation": "Sprite", - "type": "objectList" + "description": "X position", + "name": "PositionX", + "type": "expression" }, { - "description": "Obstacle", - "name": "Obstacle", - "type": "objectList" + "description": "Y position", + "name": "PositionY", + "type": "expression" + }, + { + "description": "Bonus type", + "name": "Type", + "supplementaryInformation": "[]", + "type": "expression" } ], "objectGroups": [] - }, + } + ], + "eventsBasedBehaviors": [ { - "description": "Create one line of Explosion object in a given direction.", - "fullName": "Create an explosion arm", - "functionType": "Action", - "name": "CreateExplosionArm", - "private": true, - "sentence": "Creat an explosion arm with _PARAM2_ from _PARAM1_ to _PARAM3_ in the direction _PARAM4_° (_PARAM5_ ; _PARAM6_)", - "events": [ + "description": "A player that picks up bonuses to become more powerful.", + "fullName": "Player behavior", + "name": "PlayerBehavior", + "objectType": "", + "eventsFunctions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "iteration", - "=", - "1" + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::ResetPowers" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Pick up a bonus and gain powers.", + "fullName": "Pick up bonus", + "functionType": "Action", + "name": "PickUpBonus", + "sentence": "_PARAM0_ pick up _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "VarObjet" + }, + "parameters": [ + "Bonus", + "Type", + "=", + "1" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetPropertyBombCapacity" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } ] - } - ], - "events": [ + }, { - "infiniteLoopWarning": true, - "type": "BuiltinCommonInstructions::While", - "whileConditions": [ + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "VarScene" + "value": "VarObjet" }, "parameters": [ - "iteration", - "<=", - "Bomb.Variable(Range)" + "Bonus", + "Type", + "=", + "2" ] } ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetPropertyBombRange" + }, + "parameters": [ + "Object", + "Behavior", + "+", + "1" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "The structure Bonus of the Player allow to keep up the bonuses caught by the player and their location so they can be set back when he dies." + }, + { + "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "Create" + "value": "SetNumberVariable" }, "parameters": [ - "", - "Explosion", - "Bomb.X() + GetArgumentAsNumber(\"ExplosionDirectionX\") * 48 * Variable(iteration)", - "Bomb.Y() + GetArgumentAsNumber(\"ExplosionDirectionY\") * 48 * Variable(iteration)", - "\"\"" + "NewBonusIndex", + "=", + "Object.VariableChildCount(Bonus)" ] }, { "type": { - "value": "SetAngle" + "value": "ModVarObjet" }, "parameters": [ - "Explosion", + "Object", + "Bonus[NewBonusIndex].Number", "=", - "GetArgumentAsNumber(\"ExplosionDirection\")" + "Bonus.Variable(Type)" ] }, { @@ -14463,208 +22411,225 @@ "value": "ModVarObjet" }, "parameters": [ - "Explosion", - "PlayerNum", + "Object", + "Bonus[NewBonusIndex].X", "=", - "Bomb.Variable(PlayerNum)" + "Bonus.X()" ] - } - ], - "events": [ + }, { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "type": { + "value": "ModVarObjet" }, - "comment": "The arm squares (+11) are over the finger squares (+10) and the center squares are over the other 2 (+12). It makes a better continuity on the explosions sprites." + "parameters": [ + "Object", + "Bonus[NewBonusIndex].Y", + "=", + "Bonus.Y()" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "iteration", - "<", - "Bomb.Variable(Range)" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "Explosion", - "\"ExplosionArm\"" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Explosion", - "=", - "Explosion.Y() + 11" - ] - } + "type": { + "value": "Delete" + }, + "parameters": [ + "Bonus", + "" ] - }, + } + ], + "variables": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "VarScene" - }, - "parameters": [ - "iteration", - "=", - "Bomb.Variable(Range)" - ] - } - ], + "folded": true, + "name": "NewBonusIndex", + "type": "number", + "value": 0 + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + }, + { + "description": "Bonus", + "name": "Bonus", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "The bonus accumulated by the dead player come back to their initial locations.", + "fullName": "Give back all bonuses", + "functionType": "Action", + "name": "GiveBackBonuses", + "sentence": "_PARAM0_ give back all _PARAM2_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::ResetPowers" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Repeat", + "repeatExpression": "Object.VariableChildCount(Bonus)", + "conditions": [], "actions": [ { "type": { - "value": "SetAnimationName" + "value": "Player::CreateBonus" }, "parameters": [ - "Explosion", - "\"ExplosionFinger\"" + "", + "Bonus", + "Object.Variable(Bonus[Iteration].X)", + "Object.Variable(Bonus[Iteration].Y)", + "Object.Variable(Bonus[Iteration].Number)", + "" ] }, { "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Explosion", - "=", - "Explosion.Y() + 10" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "ModVarScene" + "value": "SetNumberVariable" }, "parameters": [ - "iteration", + "Iteration", "+", "1" ] } ] - }, + } + ], + "variables": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 + "folded": true, + "name": "Iteration", + "type": "number", + "value": 0 + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ObjectVariableClearChildren" + }, + "parameters": [ + "Object", + "Bonus" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + }, + { + "description": "Bonus", + "name": "Bonus", + "supplementaryInformation": "Sprite", + "type": "objectListOrEmptyIfJustDeclared" + } + ], + "objectGroups": [] + }, + { + "fullName": "Reset powers", + "functionType": "Action", + "name": "ResetPowers", + "private": true, + "sentence": "Reset powers of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetPropertyBombCapacity" }, - "comment": "When an obstacle is reached, the loop is broken (by setting a big value in the iteration variable)." + "parameters": [ + "Object", + "Behavior", + "=", + "InitialBombCapacity" + ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "CollisionNP" - }, - "parameters": [ - "Explosion", - "Obstacle", - "", - "", - "" - ] - } - ], - "actions": [ - { - "type": { - "value": "ModVarScene" - }, - "parameters": [ - "iteration", - "=", - "666" - ] - } + "type": { + "value": "Player::PlayerBehavior::SetPropertyBombRange" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "InitialBombRange" ] } ] } - ] - } - ], - "parameters": [ - { - "description": "Bomb", - "name": "Bomb", - "type": "objectList" - }, - { - "description": "Explosion", - "name": "Explosion", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "Obstacle", - "name": "Obstacle", - "type": "objectList" - }, - { - "description": "Explosion direction angle", - "name": "ExplosionDirection", - "type": "expression" - }, - { - "description": "Explosion direction X", - "name": "ExplosionDirectionX", - "type": "expression" + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] }, { - "description": "Explosion direction Y", - "name": "ExplosionDirectionY", - "type": "expression" - } - ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ - { - "description": "Play the explosion animation and destroy itself.", - "fullName": "Explosion animator", - "name": "ExplosionAnimator", - "objectType": "Sprite", - "eventsFunctions": [ - { - "fullName": "", + "description": "Separate players from bombs. Players can overlap a bomb when it's created but they cant walk on a bomb that is already there.", + "fullName": "Separate from bomb", "functionType": "Action", - "name": "doStepPreEvents", - "sentence": "", + "name": "SeparateFromBomb", + "sentence": "Separate _PARAM0_ from _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Comment", @@ -14676,95 +22641,43 @@ "textG": 0, "textR": 0 }, - "comment": "The animation frame rate can only be constant. So, the animation is split to make the last frame last." + "comment": "When the player no longer overlaps the bomb, it becomes solid for this player." }, { "type": "BuiltinCommonInstructions::Standard", "conditions": [ { "type": { - "value": "AnimationEnded" + "inverted": true, + "value": "Distance" }, "parameters": [ - "Object" - ] - } - ], - "actions": [], - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionCenter\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionCenterEnding\"" - ] - } + "Object", + "Bomb", + "59", + "" ] }, { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionArm\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionArmEnding\"" - ] - } + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsOverlaping[Id]", + "True" ] - }, + } + ], + "actions": [ { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionFinger\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "SetAnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionFingerEnding\"" - ] - } + "type": { + "value": "ObjectVariableRemoveChild" + }, + "parameters": [ + "Bomb", + "IsOverlaping", + "Id" ] } ] @@ -14774,13 +22687,84 @@ "conditions": [ { "type": { - "value": "AnimationEnded" + "value": "CollisionNP" }, "parameters": [ - "Object" + "Object", + "Bomb", + "", + "", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Bomb", + "IsOverlaping[Id]", + "True" ] } ], + "actions": [ + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "Object", + "Bomb", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + }, + { + "description": "Bomb", + "name": "Bomb", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Check if a player can put a bomb.", + "fullName": "Can put a bomb", + "functionType": "Condition", + "name": "CanPutBomb", + "sentence": "_PARAM0_ can put a _PARAM2_ on the ground", + "events": [ + { + "type": "BuiltinCommonInstructions::Comment", + "color": { + "b": 109, + "g": 230, + "r": 255, + "textB": 0, + "textG": 0, + "textR": 0 + }, + "comment": "Check that no bomb is already on this square.\nThe negation of \"Is there at least one bomb on this square?\" is equivalent to \"Is there no bomb on this square?\".\nThis is not the same as having the negation directly on the condition because it would mean \"Is there a bomb that is not on this square?\"." + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], "actions": [], "events": [ { @@ -14788,22 +22772,26 @@ "conditions": [ { "type": { - "value": "AnimationName" + "value": "Bomb::BombBehavior::PlayerId" }, "parameters": [ - "Object", - "\"ExplosionCenterEnding\"" + "Bomb", + "BombBehavior", + "=", + "Id", + "" ] } ], "actions": [ { "type": { - "value": "Delete" + "value": "SetNumberVariable" }, "parameters": [ - "Object", - "" + "OwnedBombCount", + "=", + "PickedInstancesCount(Bomb)" ] } ] @@ -14813,51 +22801,52 @@ "conditions": [ { "type": { - "value": "AnimationName" - }, - "parameters": [ - "Object", - "\"ExplosionArmEnding\"" - ] - } - ], - "actions": [ - { - "type": { - "value": "Delete" + "value": "NumberVariable" }, "parameters": [ - "Object", - "" - ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [ + "OwnedBombCount", + "<", + "BombCapacity" + ] + }, { "type": { - "value": "AnimationName" + "value": "BuiltinCommonInstructions::Not" }, - "parameters": [ - "Object", - "\"ExplosionFingerEnding\"" + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "CollisionPoint" + }, + "parameters": [ + "Bomb", + "round(Object.X() / 48) * 48 + 24", + "round(Object.Y() / 48) * 48 + 24" + ] + } ] } ], "actions": [ { "type": { - "value": "Delete" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "" + "True" ] } ] } + ], + "variables": [ + { + "folded": true, + "name": "OwnedBombCount", + "type": "number", + "value": 0 + } ] } ], @@ -14865,146 +22854,34 @@ { "description": "Object", "name": "Object", - "supplementaryInformation": "Sprite", "type": "object" }, { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "BombExplosion::ExplosionAnimator", + "supplementaryInformation": "Player::PlayerBehavior", "type": "behavior" - } - ], - "objectGroups": [] - } - ], - "propertyDescriptors": [], - "sharedPropertyDescriptors": [] - } - ], - "eventsBasedObjects": [] - }, - { - "author": "", - "category": "", - "extensionNamespace": "", - "fullName": "", - "helpPath": "", - "iconUrl": "", - "name": "Player", - "previewIconUrl": "", - "shortDescription": "", - "version": "", - "description": "", - "tags": [], - "authorIds": [], - "dependencies": [], - "eventsFunctions": [ - { - "description": "Create a bonus at specified position.", - "fullName": "Create bonus", - "functionType": "Action", - "name": "CreateBonus", - "sentence": "Create _PARAM1_ of type _PARAM4_ at position _PARAM2_ ; _PARAM3_", - "events": [ - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], - "actions": [ - { - "type": { - "value": "Create" - }, - "parameters": [ - "", - "Bonus", - "GetArgumentAsNumber(\"PositionX\")", - "GetArgumentAsNumber(\"PositionY\")", - "" - ] - }, - { - "type": { - "value": "ChangePlan" - }, - "parameters": [ - "Bonus", - "=", - "Bonus.Y() + 10" - ] - }, - { - "type": { - "value": "ChangeHeight" - }, - "parameters": [ - "Bonus", - "=", - "48" - ] }, { - "type": { - "value": "ChangeWidth" - }, - "parameters": [ - "Bonus", - "=", - "48" - ] + "description": "Bomb", + "name": "Bomb", + "type": "objectList" }, { - "type": { - "value": "ChangeAnimation" - }, - "parameters": [ - "Bonus", - "=", - "GetArgumentAsNumber(\"Type\")" - ] + "description": "Bomb behavior", + "name": "BombBehavior", + "supplementaryInformation": "Bomb::BombBehavior", + "type": "behavior" } - ] - } - ], - "parameters": [ - { - "description": "Bonus", - "name": "Bonus", - "supplementaryInformation": "Sprite", - "type": "objectList" - }, - { - "description": "X position", - "name": "PositionX", - "type": "expression" - }, - { - "description": "Y position", - "name": "PositionY", - "type": "expression" + ], + "objectGroups": [] }, { - "description": "Bonus type", - "name": "Type", - "supplementaryInformation": "[]", - "type": "expression" - } - ], - "objectGroups": [] - } - ], - "eventsBasedBehaviors": [ - { - "description": "A player that picks up bonuses to become more powerful.", - "fullName": "Player", - "name": "Player", - "objectType": "", - "eventsFunctions": [ - { - "fullName": "", + "description": "The player put a bomb in its curent square", + "fullName": "Put a bomb", "functionType": "Action", - "name": "onCreated", - "sentence": "", + "name": "PutBomb", + "sentence": "_PARAM0_ put a _PARAM2_ on the ground", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15012,11 +22889,35 @@ "actions": [ { "type": { - "value": "Player::Player::ResetPowers" + "value": "Create" }, "parameters": [ - "Object", - "Behavior", + "", + "Bomb", + "round(Object.X() / 48) * 48", + "round(Object.Y() / 48) * 48", + "" + ] + }, + { + "type": { + "value": "ChangePlan" + }, + "parameters": [ + "Bomb", + "=", + "Bomb.Y() + 10" + ] + }, + { + "type": { + "value": "Bomb::BombBehavior::Initialize" + }, + "parameters": [ + "Bomb", + "BombBehavior", + "Id", + "BombRange", "" ] } @@ -15032,138 +22933,178 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Player::Player", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + }, + { + "description": "Bomb", + "name": "Bomb", + "type": "objectListOrEmptyIfJustDeclared" + }, + { + "description": "Bomb behavior", + "name": "BombBehavior", + "supplementaryInformation": "Bomb::BombBehavior", "type": "behavior" } ], "objectGroups": [] }, { - "description": "Pick up a bonus and gain powers.", - "fullName": "Pick up bonus", + "description": "Allow a player to walk on a bomb created under their foot.", + "fullName": "Allow to walk on a bomb", "functionType": "Action", - "name": "PickUpBonus", - "sentence": "_PARAM0_ pick up _PARAM2_", + "name": "AllowToWalkOnBomb", + "sentence": "Allow _PARAM0_ to walk on a _PARAM2_ created under their foot.", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "Bonus", - "\"BombBonus\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "SetObjectVariableAsBoolean" }, "parameters": [ - "Object", - "BombCapacity", - "+", - "1" + "Bomb", + "IsOverlaping[Id]", + "True" ] } ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" }, + { + "description": "", + "name": "Bomb", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "the player id of the object.", + "fullName": "Player id", + "functionType": "ExpressionAndCondition", + "group": "Player configuration", + "name": "Id", + "sentence": "the player id", + "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [ - { - "type": { - "value": "AnimationName" - }, - "parameters": [ - "Bonus", - "\"FlameBonus\"" - ] - } - ], + "conditions": [], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Range", - "+", - "1" + "Id" ] } ] - }, + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ { - "type": "BuiltinCommonInstructions::Comment", - "color": { - "b": 109, - "g": 230, - "r": 255, - "textB": 0, - "textG": 0, - "textR": 0 - }, - "comment": "The structure Bonus of the Player allow to keep up the bonuses caught by the player and their location so they can be set back when he dies." + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "the initial bomb capacity of the object.", + "fullName": "Initial bomb capacity", + "functionType": "ExpressionAndCondition", + "group": "Player configuration", + "name": "InitialBombCapacity", + "sentence": "the initial bomb capacity", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarScene" - }, - "parameters": [ - "newIndex", - "=", - "Object.VariableChildCount(Bonus)" - ] - }, - { - "type": { - "value": "ModVarObjet" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Bonus[VariableString(newIndex)][\"Number\"]", - "=", - "Bonus.Animation()" + "InitialBombCapacity" ] - }, + } + ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "InitialBombCapacity", + "name": "SetInitialBombCapacity", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ { "type": { - "value": "ModVarObjet" + "value": "Player::PlayerBehavior::SetPropertyInitialBombCapacity" }, "parameters": [ "Object", - "Bonus[VariableString(newIndex)][\"X\"]", + "Behavior", "=", - "Bonus.X()" + "Value" ] }, { "type": { - "value": "ModVarObjet" + "value": "Player::PlayerBehavior::ResetPowers" }, "parameters": [ "Object", - "Bonus[VariableString(newIndex)][\"Y\"]", - "=", - "Bonus.Y()" - ] - }, - { - "type": { - "value": "Delete" - }, - "parameters": [ - "Bonus", + "Behavior", "" ] } @@ -15179,24 +23120,19 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Player::Player", + "supplementaryInformation": "Player::PlayerBehavior", "type": "behavior" - }, - { - "description": "Bonus", - "name": "Bonus", - "supplementaryInformation": "Sprite", - "type": "objectList" } ], "objectGroups": [] }, { - "description": "The bonus accumulated by the dead player come back to their initial locations.", - "fullName": "Give back all bonuses", - "functionType": "Action", - "name": "GiveBackBonuses", - "sentence": "_PARAM0_ give back all _PARAM2_", + "description": "the initial bomb range of the object.", + "fullName": "Initial bomb range", + "functionType": "ExpressionAndCondition", + "group": "Player configuration", + "name": "InitialBombRange", + "sentence": "the initial bomb range", "events": [ { "type": "BuiltinCommonInstructions::Standard", @@ -15204,73 +23140,111 @@ "actions": [ { "type": { - "value": "Player::Player::ResetPowers" + "value": "SetReturnNumber" }, "parameters": [ - "Object", - "Behavior", - "" + "InitialBombRange" ] } ] + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "ActionWithOperator", + "getterName": "InitialBombRange", + "name": "SetInitialBombRange", + "sentence": "", + "events": [ { "type": "BuiltinCommonInstructions::Standard", "conditions": [], "actions": [ { "type": { - "value": "ModVarScene" + "value": "Player::PlayerBehavior::SetPropertyInitialBombRange" }, "parameters": [ - "iteration", + "Object", + "Behavior", "=", - "0" + "Value" ] - } - ] - }, - { - "type": "BuiltinCommonInstructions::Repeat", - "repeatExpression": "Object.VariableChildCount(Bonus)", - "conditions": [], - "actions": [ + }, { "type": { - "value": "Player::CreateBonus" + "value": "Player::PlayerBehavior::ResetPowers" }, "parameters": [ - "", - "Bonus", - "Object.Variable(Bonus[ToString(Variable(iteration))][\"X\"])", - "Object.Variable(Bonus[ToString(Variable(iteration))][\"Y\"])", - "Object.Variable(Bonus[ToString(Variable(iteration))][\"Number\"])", + "Object", + "Behavior", "" ] - }, + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "Player::PlayerBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the player is dead.", + "fullName": "Is dead", + "functionType": "Condition", + "group": "Player behavior configuration", + "name": "IsDead", + "sentence": "_PARAM0_ is dead", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarScene" + "value": "Player::PlayerBehavior::PropertyIsDead" }, "parameters": [ - "iteration", - "+", - "1" + "Object", + "Behavior" ] } - ] - }, - { - "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + ], "actions": [ { "type": { - "value": "ObjectVariableClearChildren" + "value": "SetReturnBoolean" }, "parameters": [ - "Object", - "Bonus" + "True" ] } ] @@ -15285,49 +23259,67 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Player::Player", + "supplementaryInformation": "Player::PlayerBehavior", "type": "behavior" - }, - { - "description": "Bonus", - "name": "Bonus", - "supplementaryInformation": "Sprite", - "type": "objectList" } ], "objectGroups": [] }, { - "fullName": "Reset powers", + "description": "Mark the player as dead.", + "fullName": "Mark as dead", "functionType": "Action", - "name": "ResetPowers", - "private": true, - "sentence": "Reset powers of _PARAM0_", + "group": "Player behavior configuration", + "name": "SetIsDead", + "sentence": "Mark _PARAM0_ as dead: _PARAM2_", "events": [ { "type": "BuiltinCommonInstructions::Standard", - "conditions": [], + "conditions": [ + { + "type": { + "inverted": true, + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], "actions": [ { "type": { - "value": "ModVarObjet" + "value": "Player::PlayerBehavior::SetPropertyIsDead" }, "parameters": [ "Object", - "Range", - "=", - "GlobalVariable(Flame)" + "Behavior", + "no" ] - }, + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ { "type": { - "value": "ModVarObjet" + "value": "GetArgumentAsBoolean" + }, + "parameters": [ + "\"Value\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "Player::PlayerBehavior::SetPropertyIsDead" }, "parameters": [ "Object", - "BombCapacity", - "=", - "GlobalVariable(Bomb)" + "Behavior", + "yes" ] } ] @@ -15342,14 +23334,83 @@ { "description": "Behavior", "name": "Behavior", - "supplementaryInformation": "Player::Player", + "supplementaryInformation": "Player::PlayerBehavior", "type": "behavior" + }, + { + "defaultValue": "yes", + "description": "IsDead", + "name": "Value", + "optional": true, + "type": "yesorno" } ], "objectGroups": [] } ], - "propertyDescriptors": [], + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "unit": "Dimensionless", + "label": "Player id", + "description": "", + "group": "", + "extraInformation": [], + "name": "Id" + }, + { + "value": "2", + "type": "Number", + "unit": "Dimensionless", + "label": "Initial bomb capacity", + "description": "", + "group": "", + "extraInformation": [], + "name": "InitialBombCapacity" + }, + { + "value": "2", + "type": "Number", + "label": "Initial bomb range", + "description": "", + "group": "", + "extraInformation": [], + "name": "InitialBombRange" + }, + { + "value": "2", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "BombCapacity" + }, + { + "value": "2", + "type": "Number", + "unit": "Dimensionless", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "BombRange" + }, + { + "value": "", + "type": "Boolean", + "label": "", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsDead" + } + ], "sharedPropertyDescriptors": [] } ],