Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gdevelop5:behaviors:platformer [2018/10/13 23:18]
valiant_curiosity [Platform and Platform character behaviors]
gdevelop5:behaviors:platformer [2019/05/18 22:31] (current)
piyushpalawat99
Line 5: Line 5:
 </​note>​ </​note>​
  
-With the simple click of a button, you can setup your game's "​Platform"​ behavior as well as  the platform character control!+With the simple click of a button, you can set up your game's "​Platform"​ behavior as well as the platform character control!
 ===== Platform behavior ===== ===== Platform behavior =====
 {{ :​gdevelop5:​behaviors:​select-platform-behavior.png?​nolink }} {{ :​gdevelop5:​behaviors:​select-platform-behavior.png?​nolink }}
-As usual, create a new object. Select the object from the Scene "​Objects"​ list by clicking on the "click to add an object"​ option. ​ From the list that pops up, choose "edit object"​. Select the "​Platform"​ behavior from the list that is displayed. You can now turn your object ​in to a platform. Once your object is defined as a "​Platform",​ your "​Platform character"​ object can walk on it.+As usual, create a new object. Select the object from the Scene "​Objects"​ list by clicking on the "click to add an object"​ option. ​ From the list that pops up, choose "edit object"​. Select the "​Platform"​ behavior from the list that is displayed. You can now turn your object ​into a platform. Once your object is defined as a "​Platform",​ your "​Platform character"​ object can walk on it.
  
 After selecting the "​Platform"​ option, you will see the Platform behavior options ​ list: After selecting the "​Platform"​ option, you will see the Platform behavior options ​ list:
Line 22: Line 22:
  
 * **Platform:​** this is the default option. The default behavior sets the object as a traditional platform. The character can collide with the platform and/or walk on it. * **Platform:​** this is the default option. The default behavior sets the object as a traditional platform. The character can collide with the platform and/or walk on it.
-* **Jumpthru platform:** by choosing this option, the character can collide with the platform and walk on it, but the character can  also jump thru the platform from below. +* **Jumpthru platform:** by choosing this option, the character can collide with the platform and walk on it, but the character can also jump thru the platform from below. 
-* **Ladder:** as it name suggests, this option turns our object into a ladder. The character object ​can not collide with the ladder object. It can not walk on the ladder object, but, when the character object overlaps the ladder object, the character is able to climb up and down.+* **Ladder:** as its name suggests, this option turns our object into a ladder. The character object ​cannot ​collide with the ladder object. It can not walk on the ladder object, but, when the character object overlaps the ladder object, the character is able to climb up and get down using the ladder object.
  
 ==== Grab the ledge ==== ==== Grab the ledge ====
-The ledge of our platform can be grabbed by default. ​ "Grab the ledge" means that when the character object jumps close enough to the edge of the platform, the ledge can be grabbed. If you don't need this functionality make sure this option is unticked/​unchecked. If you do need it, make sure the box is ticked/​checked.+The ledge of our platform can be grabbed by default. ​ "Grab the ledge" means that when the character object jumps close enough to the edge of the platform, the ledge can be grabbed. If you don't need this functionalitymake sure this option is unticked/​unchecked. If you do need it, make sure the box is ticked/​checked.
 {{ :​gdevelop5:​behaviors:​ledges-canbe-grabbed-option.png?​nolink }} {{ :​gdevelop5:​behaviors:​ledges-canbe-grabbed-option.png?​nolink }}
  
-The offset of the grab can also be changed on the Y axis.+The offset of the grab can also be changed on the Y-axis.
 {{ :​gdevelop5:​behaviors:​grab-offset-option.png?​nolink }} {{ :​gdevelop5:​behaviors:​grab-offset-option.png?​nolink }}
 The offset option allows us to change the position of the grab to fit the animation of our character. The offset option allows us to change the position of the grab to fit the animation of our character.
Line 37: Line 37:
 {{ :​gdevelop5:​behaviors:​select-platformer-character-behavior.png?​nolink }} {{ :​gdevelop5:​behaviors:​select-platformer-character-behavior.png?​nolink }}
  
-By selecting the "​Platformer character"​ from the list, we can turn our object ​in to a "​Platformer character"​+By selecting the "​Platformer character"​ from the list, we can turn our object ​into a "​Platformer character"​
 After selecting the "​Platformer character"​ option, you will be presented with the Platformer character properties/​parameters. After selecting the "​Platformer character"​ option, you will be presented with the Platformer character properties/​parameters.
 {{ :​gdevelop5:​behaviors:​platformer-character-behavior-options.png?​nolink }} {{ :​gdevelop5:​behaviors:​platformer-character-behavior-options.png?​nolink }}
Line 48: Line 48:
 ==== Grab the ledge ==== ==== Grab the ledge ====
  
-As with the Platform Behavior, we have the "Grab the ledge" option for the "​Platformer character"​. This option allows the character object to grab the ledge of the platforms. The option is disabled by default. To enable it tick/check the box in the options list.+As with the Platform Behavior, we have the "Grab the ledge" option for the "​Platformer character"​. This option allows the character object to grab the ledge of the platforms. The option is disabled by default. To enable ittick/check the box in the options list.
 {{ :​gdevelop5:​behaviors:​platformer-character-grabledge-box.png?​nolink |}} {{ :​gdevelop5:​behaviors:​platformer-character-grabledge-box.png?​nolink |}}
  
-If you decide to enable this option, the character can grab the ledge of all of the platforms that also have this option enabled.+If you decide to enable this option, the character can grab the ledge of all of the platforms ​provided ​that they too have this option enabled.
  
-Again, as with the "​Platform Behavior",​ we can set the grab offset on the Y axis for the character. Unlike the Platform Behavior, we can also set the grab tolerance on the X axis.+Again, as with the "​Platform Behavior",​ we can set the grab offset on the Y axis for the character. Unlike the Platform Behavior, we can also set the grab tolerance on the X-axis.
 {{ :​gdevelop5:​behaviors:​platformer-character-grab-tolerancex.png?​nolink |}} {{ :​gdevelop5:​behaviors:​platformer-character-grab-tolerancex.png?​nolink |}}
  
Line 59: Line 59:
 ==== Slope max angle ==== ==== Slope max angle ====
 {{ :​gdevelop5:​behaviors:​platformer-character-maximum-slope.png?​nolink |}} {{ :​gdevelop5:​behaviors:​platformer-character-maximum-slope.png?​nolink |}}
-By changing this value, we can set the maximum angle of a slope that the player can climb. The default is 0. 0 default means the character can move only on flat surface.+By changing this value, we can set the maximum angle of a slope that the player can climb. The default is 0. 0 default means the character can move only on flat surface.
  
 ==== Speed and Gravity ==== ==== Speed and Gravity ====
 {{ :​gdevelop5:​behaviors:​platformer-character-speed-options.png?​nolink |}} {{ :​gdevelop5:​behaviors:​platformer-character-speed-options.png?​nolink |}}
-By changing the corresponding values under the "Speed and Gravity"​ options, we can change how fast our character accelerates,​ decelerates,​ moves, falls and jumps. I believe these options are self explanatory so I don't think they require much explanation. If you want to slow the character object down,  you can decrease these values. If you want to speed the character object up, you can increase these values. ​+By changing the corresponding values under the "Speed and Gravity"​ options, we can change how fast our character accelerates,​ decelerates,​ moves, falls and jumps. I believe these options are self-explanatory so I don't think they require much explanation. If you want to slow the character object down,  you can decrease these values. If you want to speed the character object up, you can increase these values. ​
  
 All the options here can also be changed using events at any time during the game. All the options here can also be changed using events at any time during the game.
Line 83: Line 83:
  
 * https://​editor.gdevelop-app.com/?​project=example://​parallax-scrolling * https://​editor.gdevelop-app.com/?​project=example://​parallax-scrolling
-