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:topdown [2019/05/29 12:12]
akbarhabeebb [Add behavior to object] Typo
gdevelop5:behaviors:topdown [2019/06/18 13:09] (current)
piyushpalawat99
Line 5: Line 5:
 </​note>​ </​note>​
  
-{{:​gdevelop5:​behaviors:​topdownmovementbehavioricon.jpg?30|}} The "Top Down Movement"​ behavior allows the additional functionality of moving an object in either 4 or 8 directions.+{{:​gdevelop5:​behaviors:​topdownmovementbehavioriconnew.jpg?|}} The "Top Down Movement"​ behavior allows the additional functionality of moving an object in either 4 or 8 directions. 
 ==== Add behavior to object ==== ==== Add behavior to object ====
 +
 To add the Top Down behavior to an object, first, open the object properties by accessing the object in the object menu or by right-clicking on the object in a scene. Select “Edit object” from the popup list. Then select “Behaviors” and click the add behavior button. To add the Top Down behavior to an object, first, open the object properties by accessing the object in the object menu or by right-clicking on the object in a scene. Select “Edit object” from the popup list. Then select “Behaviors” and click the add behavior button.
 +
 ==== Top-Down Movement behavior ==== ==== Top-Down Movement behavior ====
 +
 By selecting the Top Down Movement behavior from the list, we add the functionality to our object. By selecting the Top Down Movement behavior from the list, we add the functionality to our object.
 +
 {{ :​gdevelop5:​behaviors:​top-down-movement-behav-inlist.png?​nolink |}} {{ :​gdevelop5:​behaviors:​top-down-movement-behav-inlist.png?​nolink |}}
  
 After selecting the behavior, we should immediately see the available options: After selecting the behavior, we should immediately see the available options:
 +
 {{ :​gdevelop5:​behaviors:​topdown-movement-options.png?​nolink |}} {{ :​gdevelop5:​behaviors:​topdown-movement-options.png?​nolink |}}
  
Line 18: Line 24:
  
 By changing the value of Acceleration,​ Deceleration and Max speed, we can change how fast our object is going to move. By changing the value of Acceleration,​ Deceleration and Max speed, we can change how fast our object is going to move.
 +
 By changing the value of Rotation speed, we can change how fast our object is going to rotate or if it going to rotate at all. I'll explain more about rotation, below. By changing the value of Rotation speed, we can change how fast our object is going to rotate or if it going to rotate at all. I'll explain more about rotation, below.
 +
 ==== Change angle offset ==== ==== Change angle offset ====
  
 By default, the facing angle of our sprite is 0 which is the right side of our sprite, but we can change the way that our object is facing by changing the value of Angle offset. Here is an image to help you understand the coordinates in GDevelop: By default, the facing angle of our sprite is 0 which is the right side of our sprite, but we can change the way that our object is facing by changing the value of Angle offset. Here is an image to help you understand the coordinates in GDevelop:
  
-{{ :​gdevelop5:​behaviors:​gdevelop_covaliantcuriosity.jpg?​400 |}} +{{ :​gdevelop5:​behaviors:​gdevelop_covaliantcuriosity.jpg?​ |}}
- +
  
 ==== Allows diagonals ==== ==== Allows diagonals ====
  
 {{ :​gdevelop5:​behaviors:​allow-diagonals-box.png?​nolink |}} {{ :​gdevelop5:​behaviors:​allow-diagonals-box.png?​nolink |}}
 +
 This option is enabled by default. We allow our object to move diagonally in 8 directions. By disabling this option, we don't allow diagonal movement. When disabled, we can move only in 4 directions: left, right, up and down. Diagonal movement is no longer allowed. This option is enabled by default. We allow our object to move diagonally in 8 directions. By disabling this option, we don't allow diagonal movement. When disabled, we can move only in 4 directions: left, right, up and down. Diagonal movement is no longer allowed.
  
Line 35: Line 42:
  
 {{ :​gdevelop5:​behaviors:​top-down-movement-default-controls-box.png?​nolink |}} {{ :​gdevelop5:​behaviors:​top-down-movement-default-controls-box.png?​nolink |}}
 +
 The Top Down Movement behavior comes with default controls enabled. The default controls are the four keyboard arrow keys. If we would like to use custom controls to move the object we need to disable this option by unchecking the box and after we need to use the top down movement events to move the Object. The Top Down Movement behavior comes with default controls enabled. The default controls are the four keyboard arrow keys. If we would like to use custom controls to move the object we need to disable this option by unchecking the box and after we need to use the top down movement events to move the Object.
 +
 {{ :​gdevelop5:​behaviors:​top-down-movement-events.png?​nolink |}} {{ :​gdevelop5:​behaviors:​top-down-movement-events.png?​nolink |}}
  
Line 41: Line 50:
  
 {{ :​gdevelop5:​behaviors:​top-down-movement-rotateobject-box.png?​nolink |}} {{ :​gdevelop5:​behaviors:​top-down-movement-rotateobject-box.png?​nolink |}}
 +
 By default, our object will rotate toward the direction of movement. The object will rotate at the speed we specify in the Rotation speed option. If we don't want the object to rotate, we need to disable this by unchecking the box. By default, our object will rotate toward the direction of movement. The object will rotate at the speed we specify in the Rotation speed option. If we don't want the object to rotate, we need to disable this by unchecking the box.
  
 We can also change any of these options by using events found in the "​Events"​ tab section of GDevelop at any time during the game.  We can also change any of these options by using events found in the "​Events"​ tab section of GDevelop at any time during the game. 
  
-{{ :​gdevelop5:​behaviors:​eventstab.jpg?600 |}}+{{ :​gdevelop5:​behaviors:​eventstabnew.jpg? |}}
  
  
Line 56: Line 66:
 **Space Shooter** **Space Shooter**
  
-{{:​gdevelop5:​behaviors:​spaceshooter.png?​400|}}+{{:​gdevelop5:​behaviors:​spaceshooter.png?​|https://​editor.gdevelop-app.com/?​project=example://​space-shooter 
 +}}
  
 * https://​editor.gdevelop-app.com/?​project=example://​space-shooter * https://​editor.gdevelop-app.com/?​project=example://​space-shooter
Line 62: Line 73:
 **Isometric Game** (creates an illusion of 3D graphics within a 2D graphics game) **Isometric Game** (creates an illusion of 3D graphics within a 2D graphics game)
  
-{{:​gdevelop5:​behaviors:​isometricgame.png?​400|}}+{{:​gdevelop5:​behaviors:​isometricgame.png?​|https://​editor.gdevelop-app.com/?​project=example://​isometric-game}}
  
 * https://​editor.gdevelop-app.com/?​project=example://​isometric-game * https://​editor.gdevelop-app.com/?​project=example://​isometric-game