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:events-based-behaviors [2020/03/29 19:31]
4ian
gdevelop5:behaviors:events-based-behaviors [2020/03/30 10:04] (current)
4ian
Line 5: Line 5:
 In GDevelop, you can now create your own **custom behaviors**. Like the usual, built-in behaviors, they can be attached to objects. They will then *interact with the object automatically*. They can **move the object**, change its **variables**,​ change the animations (for Sprite objects), change the text (for text objects) and more generally, do anything that you can usually do with events. In GDevelop, you can now create your own **custom behaviors**. Like the usual, built-in behaviors, they can be attached to objects. They will then *interact with the object automatically*. They can **move the object**, change its **variables**,​ change the animations (for Sprite objects), change the text (for text objects) and more generally, do anything that you can usually do with events.
  
-<note tip>If you want to see an example of how behaviors can be used in your game, read [[gdevelop5:​tutorials:​how-to-make-behavior|How to make a behavior for an object]]. It's a step by step explanation and a good guide about architecturing your game with behaviors</​note>​+<note tip>If you want to see an example of how behaviors can be used in your game, read [[gdevelop5:​tutorials:​how-to-make-behavior|How to make a behavior for an object]]. It's a step by step explanation and a good guide about architecturing your game with behaviors.</​note>​
  
 ## Create a new behavior ## Create a new behavior
Line 149: Line 149:
   * You can create a behavior that increases the "​Score"​ variable when the object is destroyed. You can then create items, collectibles or enemies that have this behavior, and when they are collected or killed, the score will automatically increase.   * You can create a behavior that increases the "​Score"​ variable when the object is destroyed. You can then create items, collectibles or enemies that have this behavior, and when they are collected or killed, the score will automatically increase.
  
 +<note tip>If you want to see an example of how behaviors can be used in your game, read [[gdevelop5:​tutorials:​how-to-make-behavior|How to make a behavior for an object]]. It's a step by step explanation and a good guide about architecturing your game with behaviors.</​note>​