Skip to content

Commit

Permalink
Update page about behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
4ian authored Sep 28, 2024
1 parent a214309 commit 2cbb684
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 59 deletions.
Binary file added docs/gdevelop5/behaviors/add-behavior-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 0 additions & 31 deletions docs/gdevelop5/behaviors/bounce/index.md

This file was deleted.

Binary file added docs/gdevelop5/behaviors/community-behaviors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 27 additions & 28 deletions docs/gdevelop5/behaviors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,64 +7,63 @@ In GDevelop, _behaviors_ add significant features to [objects](/gdevelop5/object

For example, behaviors can:

* Move the camera to follow an object.
* Automatically remove objects from a scene when they move outside the edges of the screen.
* Handle health, damage, ammo and other elemnts of the player or an enemy.
* Make objects move in a realistic way by following the laws of physics.
* Allow players to move an object with the arrow keys.

You can also customize behaviors to make your game feel unique and use [events](/gdevelop5/events) to manipulate behaviors.
Most behaviors can be customized to make your game feel unique. Behaviors attached to an object can be manipulated in [events](/gdevelop5/events).

<div class="video-container">
<iframe src="https://www.youtube.com/embed/-U8WFcpUmMg" frameborder="0" allowfullscreen></iframe>
</div>

## List of behaviors
## Most commonly used behaviors

This section lists the different types of behaviors, each of which is useful for adding different types of features to objects.
Here are some commonly used behaviors:

- [Anchor](/gdevelop5/behaviors/anchor)
- [Bounce](/gdevelop5/behaviors/bounce)
- [Destroy outside screen](/gdevelop5/behaviors/destroyoutside)
- [Draggable](/gdevelop5/behaviors/draggable)
- [Pathfinding](/gdevelop5/behaviors/pathfinding)
- [Physics 2](/gdevelop5/behaviors/physics2)
- [Physics](/gdevelop5/behaviors/physics2)
- [Platformer objects and platforms](/gdevelop5/behaviors/platformer)
- [Top-down movement](/gdevelop5/behaviors/topdown)
- [Tween](/gdevelop5/behaviors/tween)

Refer to the linked pages to learn more about each type of behavior.
Refer to the linked pages to learn more about each behavior. While these behaviors are often used, the [full list of behaviors available in GDevelop](/gdevelop5/extensions/) keeps growing everyday: see the [list of all GDevelop extensions](/gdevelop5/extensions/) to discover them.

### Deprecated behaviors
Behaviors can be contributed by the community or the GDevelop core development team. You can [create new behaviors](/gdevelop5/behaviors/events-based-behaviors), with or without code, directly inside GDevelop.

- [Old Physics](/gdevelop5/behaviors/physics)
!!! tip

When your game is growing, it's a good idea to make [your own behaviors]((/gdevelop5/behaviors/events-based-behaviors)) for each object in your game. Making your own behaviors allows you to keep your game modular.

## Adding a behavior to an object

1. Right-click an object in the **Objects** panel.
2. Select **Edit behaviors**.
3. Click the **Add a behavior to the object** button.
4. Select a behavior from the list.
5. Customize the behavior. The available settings depend on the behavior.
6. Click **Apply**.
To add a behavior to an object you can either:

![](/gdevelop5/behaviors-demo-create.gif)
* Select the object in the list of objects and then, in the **Properties** panel, click on the + next to the "Behaviors" section:

## Installing new behaviors
![Add a behavior from the properties panel](./add-behavior-properties-panel.png)

Anyone can [create custom behaviors](/gdevelop5/behaviors/events-based-behaviors) and share them with the GDevelop community.
You can then browse the list of behaviors. The most commonly used are displayed at the top of the list:

![The list of behaviors](./add-behavior-list.png)

![](pasted/20230305-104957.png)
* Or you can double-click on an object, and choose "Add a behavior" in the "Behaviors" tab.

## Enable searching for community-made behaviors

Anyone can [create custom behaviors](/gdevelop5/behaviors/events-based-behaviors) and share them with the GDevelop community.

To search for and install community-created behaviors:
To search for and install community-created behaviors, enable them in the list of behaviors:

1. Right click an object in the **Objects** panel.
2. Select **Edit behaviors**.
4. Click the **Add a behavior to the object** icon.
5. Switch to the **Search new behaviors** tab.
6. Search for a behavior.
7. Select a behavior.
8. Click **Install in project**.
![Enable community behaviors](./community-behaviors.png)

Installed behaviors appear in the **Installed behaviors** tab:
Note that these behaviors are not fully reviewed and might not have the same quality, flexibility and polish as the behaviors that are considered "reviewed" and shown by default in the interface.

![](pasted/20230305-105029.png)
!!! note

You can contribute by submitting your own behaviors - or improvements to existing ones - on the [GDevelop GitHub repository](https://github.com/GDevelopApp/GDevelop-extensions).

0 comments on commit 2cbb684

Please sign in to comment.