Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop5:behaviors:destroyoutside [2018/10/02 23:30]
valiant_curiosity [Destroy outside screen behavior]
gdevelop5:behaviors:destroyoutside [2019/05/29 12:06] (current)
akbarhabeebb [Add behavior to object] Typo
Line 1: Line 1:
 # Destroy outside screen behavior # Destroy outside screen behavior
  
-This is one of the most simple, yet useful, behaviors. ​ Add it to an object and then, whenever an instance of this object goes out of the bounds of the screen, this instance will be destroyed.+**[[#​Examples|I would rather see the Destroy outside ​screen ​behavior examples! Please take me there now.]] 
 +**
  
-It's a simple ​way of ensuring that your game is not filled with garbage objects that could slow it down.+This is one of the most simple, yet useful, behaviors. ​ Add it to an object and then, whenever an instance ​of this object goes out of the bounds of the game scene/​screen,​ this instance will be destroyed.
  
 +It's a simple way of ensuring that your game is not filled with garbage objects that could slow it down.
 ==== Add behavior to object ==== ==== Add behavior to object ====
  
-To add a behavior to an object, first open the object properties by right clicking on the object. Select "Edit object"​ from the popup list. Then select ​behaviors ​tab. Click the add behavior button. ​+To add a behavior to an object, first open the object properties by right-clicking on the object ​that is located in the Objects list. Select "Edit object"​ from the popup list. Then select ​the Behaviors ​tab. Click the "add behavior" ​button. ​
  
 {{ :​gdevelop5:​behaviors:​addbehavior.jpg?​600 |}} {{ :​gdevelop5:​behaviors:​addbehavior.jpg?​600 |}}
  
-## Examples+==== Destroy when outside of screen ==== 
 +{{ :​gdevelop5:​behaviors:​destroy-outside-screen-behavior-inlist.png?​nolink |}} 
 + 
 +Once you have selected the destroy behavior from the list, it is going to eliminate the object whenever it is outside the screen. This behavior has no options to change and automatically applies to all instances of the object.  
 + 
 + 
 + 
 +# Examples
  
 <note tip>​**See it in action!** 🎮\\ <note tip>​**See it in action!** 🎮\\
Line 18: Line 27:
 **Outside the Screen Behavior** **Outside the Screen Behavior**
  
-{{:​gdevelop5:​behaviors:​outsidescreenbehaviorspaceshooter.png?​400|}}+[[https://​editor.gdevelop-app.com/?​project=example://​space-shooter|{{:​gdevelop5:​behaviors:​outsidescreenbehaviorspaceshooter.png?​400|}}]]
  
 * https://​editor.gdevelop-app.com/?​project=example://​space-shooter * https://​editor.gdevelop-app.com/?​project=example://​space-shooter
Line 24: Line 33:
 **Destroy Bullets Outside Screen/​Scene** **Destroy Bullets Outside Screen/​Scene**
  
-{{:​gdevelop5:​behaviors:​outsidescreendestroybullets.png?​400|}}+[[https://​editor.gdevelop-app.com/?​project=example://​shoot-bullets|{{:​gdevelop5:​behaviors:​outsidescreendestroybullets.png?​400|}}]]
  
 * https://​editor.gdevelop-app.com/?​project=example://​shoot-bullets * https://​editor.gdevelop-app.com/?​project=example://​shoot-bullets
  
 +**Shooting Bullets Explanation**
  
-https://​editor.gdevelop-app.com/?​project=example://​shooting-bullets-explanation +[[https://​editor.gdevelop-app.com/?​project=example://​shooting-bullets-explanation|{{:​gdevelop5:​behaviors:​bulletshootingexplanationexample.png?400|}}]]
- +
- +
-==== Destroy when outside of screen ==== +
-{{ :​gdevelop5:​behaviors:​destroy-outside-screen-behavior-inlist.png?nolink ​|}} +
- +
-Once you have selected the behavior from the list, it is going to destroy the object whenever it is outside the screen. This behavior has no options to change and automatically applies to all instances of the object. ​+
  
 +* https://​editor.gdevelop-app.com/?​project=example://​shooting-bullets-explanation