diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/add-behavior-function.png b/docs/gdevelop5/behaviors/events-based-behaviors/add-behavior-function.png new file mode 100644 index 00000000000..9385106f7fd Binary files /dev/null and b/docs/gdevelop5/behaviors/events-based-behaviors/add-behavior-function.png differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/behavior-function-types.png b/docs/gdevelop5/behaviors/events-based-behaviors/behavior-function-types.png new file mode 100644 index 00000000000..8f4bc91fab3 Binary files /dev/null and b/docs/gdevelop5/behaviors/events-based-behaviors/behavior-function-types.png differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/generate-property-accessors.png b/docs/gdevelop5/behaviors/events-based-behaviors/generate-property-accessors.png index 72d4d144fa6..cc4efa6919a 100644 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/generate-property-accessors.png and b/docs/gdevelop5/behaviors/events-based-behaviors/generate-property-accessors.png differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/index.md b/docs/gdevelop5/behaviors/events-based-behaviors/index.md index 69ea39137ed..1c167c1a1bf 100644 --- a/docs/gdevelop5/behaviors/events-based-behaviors/index.md +++ b/docs/gdevelop5/behaviors/events-based-behaviors/index.md @@ -27,9 +27,9 @@ Behaviors from community extensions are chosen for their ability to be useful in Behaviors are grouped into [extensions](/gdevelop5/extensions). They are the same as [the extensions that can be installed](/gdevelop5/extensions/search). Extensions of a project are listed in the [Project Manager](/gdevelop5/interface/project-manager). -![](/gdevelop5/extensions/create/pasted/20230305-115305.png) +![](/gdevelop5/extensions/create-search-extension.png){ width="447" } -Click on **Create or search for new extensions** at the bottom. Then, select **Create a new extension** to [create a new extension](/gdevelop5/extensions/create). +Click on the **+** button at the top-right of the **Extensions** section. Then, select **Create a new extension** to [create a new extension](/gdevelop5/extensions/create). By default, extensions don't have any behavior. Add one by clicking on the "+" button on the left next to **Behaviors**. @@ -45,11 +45,11 @@ Behaviors can also embed properties, which are number, strings or booleans that Click on the behavior in the list to see the list of functions composing the behavior. It will appear on the right side panel. -![](pasted/20210906-235104.png) +![](add-behavior-function.png){ width="555" } By default, a behavior is empty and does nothing. To add interactivity, you can add a new function. You'll be given the choice between some predefined functions, called *lifecycle methods*, or a custom function. Lifecycle methods will be called by the game engine automatically at some key moment during the game. Custom functions will be available to extension users as conditions, actions or expressions (like [usual functions outside behaviors](/gdevelop5/events/functions)). -![](pasted/20210906-235126.png) +![](behavior-function-types.png){ width="595" } ### Run events at object creations @@ -149,7 +149,7 @@ Properties won't be usable from outside of the behavior. Properties are said to ![](generate-property-accessors.png) -## Behaviors using other behaviors as properties +## Rely on other behaviors It is possible for behaviors to use other "required behaviors" as properties. When this is the case, GDevelop will ensure that any object using your behavior will also use the other one. You can then use the behavior entered as a property inside the actions, conditions, expressions and the lifecycle functions of your own behavior. diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235104.png b/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235104.png deleted file mode 100644 index 8985a927c80..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235104.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235126.png b/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235126.png deleted file mode 100644 index d0e24a975e3..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/pasted/20210906-235126.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/platformer-enemy-extension.png b/docs/gdevelop5/behaviors/events-based-behaviors/platformer-enemy-extension.png index 2a3322937f3..3053f7f6869 100644 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/platformer-enemy-extension.png and b/docs/gdevelop5/behaviors/events-based-behaviors/platformer-enemy-extension.png differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/add-events-based-behavior.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/add-events-based-behavior.png deleted file mode 100644 index 0bf4f6e28c0..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/add-events-based-behavior.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-choose-method.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-choose-method.png deleted file mode 100644 index 3e373691678..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-choose-method.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-custom-function-example.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-custom-function-example.png deleted file mode 100644 index 13ad69df575..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-custom-function-example.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-lifecycle-method-example.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-lifecycle-method-example.png deleted file mode 100644 index 7f524fe866b..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/behavior-lifecycle-method-example.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/choose-custom-behavior-in-list.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/choose-custom-behavior-in-list.png deleted file mode 100644 index dd5fafd7293..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/choose-custom-behavior-in-list.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/custom-behavior-action.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/custom-behavior-action.png deleted file mode 100644 index 3bcf8f0c016..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/custom-behavior-action.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/empty-behavior-functions-list.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/empty-behavior-functions-list.png deleted file mode 100644 index a58e8bf0545..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/empty-behavior-functions-list.png and /dev/null differ diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/unused/setup-destructible-behavior.png b/docs/gdevelop5/behaviors/events-based-behaviors/unused/setup-destructible-behavior.png deleted file mode 100644 index ed17459a371..00000000000 Binary files a/docs/gdevelop5/behaviors/events-based-behaviors/unused/setup-destructible-behavior.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/add-function.png b/docs/gdevelop5/events/functions/add-function.png new file mode 100644 index 00000000000..cc005b0dcc0 Binary files /dev/null and b/docs/gdevelop5/events/functions/add-function.png differ diff --git a/docs/gdevelop5/events/functions/empty-extension.png b/docs/gdevelop5/events/functions/empty-extension.png deleted file mode 100644 index 64400c5e785..00000000000 Binary files a/docs/gdevelop5/events/functions/empty-extension.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/empty-function.png b/docs/gdevelop5/events/functions/empty-function.png new file mode 100644 index 00000000000..2fc82124c56 Binary files /dev/null and b/docs/gdevelop5/events/functions/empty-function.png differ diff --git a/docs/gdevelop5/events/functions/function-description.png b/docs/gdevelop5/events/functions/function-description.png new file mode 100644 index 00000000000..28a91cd767d Binary files /dev/null and b/docs/gdevelop5/events/functions/function-description.png differ diff --git a/docs/gdevelop5/events/functions/function-usage.png b/docs/gdevelop5/events/functions/function-usage.png new file mode 100644 index 00000000000..b988d8fe388 Binary files /dev/null and b/docs/gdevelop5/events/functions/function-usage.png differ diff --git a/docs/gdevelop5/events/functions/function-using-objects.png b/docs/gdevelop5/events/functions/function-using-objects.png new file mode 100644 index 00000000000..f38e84f77ed Binary files /dev/null and b/docs/gdevelop5/events/functions/function-using-objects.png differ diff --git a/docs/gdevelop5/events/functions/function-using-string.png b/docs/gdevelop5/events/functions/function-using-string.png new file mode 100644 index 00000000000..dbc15f95900 Binary files /dev/null and b/docs/gdevelop5/events/functions/function-using-string.png differ diff --git a/docs/gdevelop5/events/functions/function_text_expression.png b/docs/gdevelop5/events/functions/function_text_expression.png deleted file mode 100644 index 3577da33431..00000000000 Binary files a/docs/gdevelop5/events/functions/function_text_expression.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/index.md b/docs/gdevelop5/events/functions/index.md index 2edd674e37d..3ace1d084c1 100644 --- a/docs/gdevelop5/events/functions/index.md +++ b/docs/gdevelop5/events/functions/index.md @@ -21,17 +21,13 @@ Similarly to scenes or [external events](/gdevelop5/interface), functions are wr Functions are grouped into [extensions](/gdevelop5/extensions). They are the same as [the extensions that can be installed](/gdevelop5/extensions/search). Extensions of a project are listed in the [Project Manager](/gdevelop5/interface/project-manager). -![](/gdevelop5/extensions/create/pasted/20230305-115305.png) +![](/gdevelop5/extensions/create-search-extension.png){ width="447" } -Click on **Create or search for new extensions** at the bottom. Then, select **Create a new extension** to [create a new extension](/gdevelop5/extensions/create). +Click on the **+** button at the top-right of the **Extensions** section. Then, select **Create a new extension** to [create a new extension](/gdevelop5/extensions/create). By default, extensions don't have any function. Add one by clicking on the "+" button on the left next to **Functions**. -![](empty-extension.png) - -### Organize functions with folders - -When an extension has many functions, you can group them into **folders** to keep the list tidy. Right-click in the functions list and choose **Add a folder**, then drag functions into it. Folder names cannot contain `/`. +![](add-function.png) A new function is added, it's time to give it a name. By convention: @@ -39,6 +35,13 @@ A new function is added, it's time to give it a name. By convention: - conditions start with `Is` for instance `IsJumping` - expressions don't have any verb for instance `JumpSpeed` +![](empty-function.png) + +### Organize functions with folders + +When an extension has many functions, you can group them into **folders** to keep the list tidy. Right-click in the functions list and choose **Add a folder**, then drag functions into it. Folder names cannot contain `/`. + + ## Describe a function Selecting a function displays its events and the **function configuration** panel on the top with a few fields: @@ -51,7 +54,7 @@ Selecting a function displays its events and the **function configuration** pane Parameters can be inserted in a sentence by writing `_PARAMx_` between underscores where `x` must be replaced by the parameter number (starting from 1). -![](pasted/20221118-093605.png) +![](function-description.png) ## Add parameters @@ -63,8 +66,6 @@ They can be added from the **Parameter** tab. Each of them requires: * **Type** - either object, number or text (see the [list of all types](/gdevelop5/events/functions/#references-of-parameters)). * **Label** - shown to extension users when filling the parameter values. -![](pasted/20221118-093700.png) - ## Write function events Events can be added to functions. These events are executed when the function is used in other event sheets. Which means through its condition, action or expression depending of the function type. @@ -77,7 +78,7 @@ Only the objects from the function parameters can be used in a function. Scene o When **Any object** is selected for the **object type**, the object can be used with a limited set of actions and conditions. Choosing a specific object type gives additional actions and conditions. -![](pasted/20221118-093830.png) +![](function-using-objects.png) Conditions and actions from behaviors can also be used in functions events. For this, behavior parameters must be added after an object parameter. @@ -97,7 +98,7 @@ Parameters can also be used directly in expressions by writing their name. For i Here is an example of a text parameter that will get a scene name, which is then used in an action for changing the scene. -![](function_text_expression.png) +![](function-using-string.png) !!! note @@ -125,7 +126,7 @@ Variables can be useful within functions for intermediary results or to keep a s Extension functions can be found in conditions and actions lists like any other feature of the engine. -![](pasted/20221118-094110.png) +![](function-usage.png) ## Write functions dedicated to your project diff --git a/docs/gdevelop5/events/functions/pasted/20221118-093605.png b/docs/gdevelop5/events/functions/pasted/20221118-093605.png deleted file mode 100644 index aa49e5abf10..00000000000 Binary files a/docs/gdevelop5/events/functions/pasted/20221118-093605.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/pasted/20221118-093700.png b/docs/gdevelop5/events/functions/pasted/20221118-093700.png deleted file mode 100644 index 5d9d490c5c2..00000000000 Binary files a/docs/gdevelop5/events/functions/pasted/20221118-093700.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/pasted/20221118-093830.png b/docs/gdevelop5/events/functions/pasted/20221118-093830.png deleted file mode 100644 index 653eb163a64..00000000000 Binary files a/docs/gdevelop5/events/functions/pasted/20221118-093830.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/pasted/20221118-094110.png b/docs/gdevelop5/events/functions/pasted/20221118-094110.png deleted file mode 100644 index 2940669c6df..00000000000 Binary files a/docs/gdevelop5/events/functions/pasted/20221118-094110.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/platformer-player-extension-usage.png b/docs/gdevelop5/events/functions/platformer-player-extension-usage.png index 3fa16b79109..4acbf34bb0e 100644 Binary files a/docs/gdevelop5/events/functions/platformer-player-extension-usage.png and b/docs/gdevelop5/events/functions/platformer-player-extension-usage.png differ diff --git a/docs/gdevelop5/events/functions/platformer-player-extension.png b/docs/gdevelop5/events/functions/platformer-player-extension.png index 3cdda75708f..9cec34c4a42 100644 Binary files a/docs/gdevelop5/events/functions/platformer-player-extension.png and b/docs/gdevelop5/events/functions/platformer-player-extension.png differ diff --git a/docs/gdevelop5/events/functions/unused/20221118-093224.png b/docs/gdevelop5/events/functions/unused/20221118-093224.png deleted file mode 100644 index d2a9f841cfa..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/20221118-093224.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/20221118-093435.png b/docs/gdevelop5/events/functions/unused/20221118-093435.png deleted file mode 100644 index 368f95c9edf..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/20221118-093435.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/add-new-function.png b/docs/gdevelop5/events/functions/unused/add-new-function.png deleted file mode 100644 index 10ad3e07623..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/add-new-function.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/events-functions-used-as-action.png b/docs/gdevelop5/events/functions/unused/events-functions-used-as-action.png deleted file mode 100644 index 5783e7d6aef..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/events-functions-used-as-action.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/function_add_parameters.png b/docs/gdevelop5/events/functions/unused/function_add_parameters.png deleted file mode 100644 index 775128e7174..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/function_add_parameters.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/function_complete_function.png b/docs/gdevelop5/events/functions/unused/function_complete_function.png deleted file mode 100644 index bb55bb215b1..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/function_complete_function.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/function_configuration.png b/docs/gdevelop5/events/functions/unused/function_configuration.png deleted file mode 100644 index 4c0aed83013..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/function_configuration.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/functionn-parameter-condition.png b/docs/gdevelop5/events/functions/unused/functionn-parameter-condition.png deleted file mode 100644 index f51dbdfe058..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/functionn-parameter-condition.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/project-manager-functions-extensions.png b/docs/gdevelop5/events/functions/unused/project-manager-functions-extensions.png deleted file mode 100644 index 6cb9e8c49be..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/project-manager-functions-extensions.png and /dev/null differ diff --git a/docs/gdevelop5/events/functions/unused/project-manager-functions-extensionsnew.png b/docs/gdevelop5/events/functions/unused/project-manager-functions-extensionsnew.png deleted file mode 100644 index ba52362ad77..00000000000 Binary files a/docs/gdevelop5/events/functions/unused/project-manager-functions-extensionsnew.png and /dev/null differ diff --git a/docs/gdevelop5/extensions/create-search-extension.png b/docs/gdevelop5/extensions/create-search-extension.png new file mode 100644 index 00000000000..4489e92c8e1 Binary files /dev/null and b/docs/gdevelop5/extensions/create-search-extension.png differ diff --git a/docs/gdevelop5/extensions/create.md b/docs/gdevelop5/extensions/create.md index 5b5d0950820..e1e37a5a82f 100644 --- a/docs/gdevelop5/extensions/create.md +++ b/docs/gdevelop5/extensions/create.md @@ -13,13 +13,13 @@ Developers can also [contribute to extensions built directly inside GDevelop](ht ## Create a new extension -Open the project manager, then click on **Create or search for new extensions**: +Open the project manager, then click on the **+** button at the top-right of the **Extensions** section: -![](create/pasted/20230305-115305.png) +![](create-search-extension.png){ width="447" } A new window opened up, at the bottom click **Create a new extension**: -![](create/pasted/20230305-115341.png) +![](extension-store.png) A new extension is added to the project manager. It's recommended to immediately change the name to something that will hint at what the extension is providing by a right click on the extension and choose **Rename**. diff --git a/docs/gdevelop5/extensions/create/pasted/20230305-115305.png b/docs/gdevelop5/extensions/create/pasted/20230305-115305.png deleted file mode 100644 index e745aa1cb78..00000000000 Binary files a/docs/gdevelop5/extensions/create/pasted/20230305-115305.png and /dev/null differ diff --git a/docs/gdevelop5/extensions/create/pasted/20230305-115341.png b/docs/gdevelop5/extensions/create/pasted/20230305-115341.png deleted file mode 100644 index d6f0deaa8a3..00000000000 Binary files a/docs/gdevelop5/extensions/create/pasted/20230305-115341.png and /dev/null differ diff --git a/docs/gdevelop5/extensions/extension-store.png b/docs/gdevelop5/extensions/extension-store.png new file mode 100644 index 00000000000..36c4368c84e Binary files /dev/null and b/docs/gdevelop5/extensions/extension-store.png differ diff --git a/docs/gdevelop5/extensions/grid_movement.gif b/docs/gdevelop5/extensions/grid_movement.gif deleted file mode 100644 index 41cef28587b..00000000000 Binary files a/docs/gdevelop5/extensions/grid_movement.gif and /dev/null differ diff --git a/docs/gdevelop5/extensions/search.md b/docs/gdevelop5/extensions/search.md index 11af98c53c1..5afc1e05da9 100644 --- a/docs/gdevelop5/extensions/search.md +++ b/docs/gdevelop5/extensions/search.md @@ -9,9 +9,9 @@ title: Install new extensions You can browse the [list of GDevelop extensions here](/gdevelop5/extensions). -Finding **new behaviors, conditions, actions or expressions** for your game in GDevelop is easy. In the [Project Manager](/gdevelop5/interface/project-manager), click on *Create or search for new extensions*: +Finding **new behaviors, conditions, actions or expressions** for your game in GDevelop is easy. In the [Project Manager](/gdevelop5/interface/project-manager), click on the **+** button at the top-right of the **Extensions** section: -![](/gdevelop5/extensions/search/pasted/20230305-114603.png) +![](/gdevelop5/extensions/create-search-extension.png){ width="447" } All the extensions from the GDevelop ecosystem will be shown: diff --git a/docs/gdevelop5/extensions/search/pasted/20230305-114603.png b/docs/gdevelop5/extensions/search/pasted/20230305-114603.png deleted file mode 100644 index fd755ffe5a7..00000000000 Binary files a/docs/gdevelop5/extensions/search/pasted/20230305-114603.png and /dev/null differ