You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: automated_updates_data.json
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,10 @@
40
40
{
41
41
"date": "2026-02-18",
42
42
"summary": "Improved sprite and video object docs: added blend modes, color/tint, flip operations, animation speed scale, and fixed video typos and playback speed range"
43
+
},
44
+
{
45
+
"date": "2026-02-18",
46
+
"summary": "Improved audio docs with fade, pitch/rate, seeking, unload, and spatial sound; improved linked objects docs with bidirectional links, auto-cleanup, and use cases"
Copy file name to clipboardExpand all lines: docs/gdevelop5/all-features/audio/index.md
+25-1Lines changed: 25 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,16 +66,36 @@ When a new scene starts, by default, sounds and music are stopped. If you want t
66
66
67
67
## Using channels
68
68
69
-
When using the "Play a sound" or "Play a music file" action, audio files are played immediately. On completion, they are removed from memory. Looping is an exception. When you set the action to loop the audio file, it will be played forever (its' an "endless loop"). You must use the action to stop all sounds or music to stop them.
69
+
When using the "Play a sound" or "Play a music file" action, audio files are played immediately. On completion, they are removed from memory. Looping is an exception. When you set the action to loop the audio file, it will be played forever (it's an "endless loop"). You must use the action to stop all sounds or music to stop them.
70
70
71
71
If you want more control over sounds, use the action "**Play a sound on a channel**" or "**Play a music file on a channel.**" The action is used in the same way, except that you have to enter a channel number. This channel number can then be reused in other actions or conditions. A "channel number" can be used to check to see if a sound is being played on a channel, or it can be used to modify some properties of the music being played. For example, you could use a "channel number" to update the music volume dynamically according to the presence of enemies around the player.
72
72
73
+
Channel numbers are arbitrary integers you choose — you can use any number you like. If you play a new sound or music on a channel that is already in use, the previous audio on that channel is stopped and replaced.
74
+
73
75
## Volume
74
76
75
77
Sounds and music are by default played with a volume of 100%, which is the maximum. When starting a new sound/music, you can enter a different value (between 0 and 100).
76
78
77
79
You can also use the action "Game global volume" to change the entire game's audio volume. A value of 0 means that no sounds and or music can be heard. This action is convenient when allowing the player to mute or change the game's volume. For instance, you might have a settings screen in your game that accesses the game's volume control. Mobile games usually have a button to mute the sounds of the game too.
78
80
81
+
### Fading volume
82
+
83
+
You can smoothly fade the volume of a sound or music on a channel from one level to another using the "**Fade the volume**" actions. Provide the starting volume, target volume, and duration in seconds. This is useful for fading in background music at the start of a scene, or fading out a sound before stopping it.
84
+
85
+
## Playback rate (pitch)
86
+
87
+
You can change the playback speed of a sound or music on a channel using the "**Set the playback speed**" actions (sometimes called pitch). A value of `1` is normal speed. Values below `1` slow the audio down (and lower the pitch), and values above `1` speed it up (and raise the pitch). The valid range is `0.5` to `4.0`.
88
+
89
+
This is useful for effects like a slowed-down time feeling, or varying the pitch of repeated sound effects to make them sound less repetitive.
90
+
91
+
## Seeking (playback position)
92
+
93
+
You can jump to a specific position within a sound or music on a channel using the "**Set the playback position**" actions, with the position given in seconds. You can also read the current playback position using the corresponding expressions. This is useful for synchronising music to game events or resuming audio from a saved position.
94
+
95
+
## Unloading audio
96
+
97
+
You can explicitly unload a sound or music file from memory using the "**Unload a sound**" / "**Unload a music**" actions. This also stops any currently playing instance of that file. Use "**Unload all audio**" to stop and unload everything at once. Unloading audio you no longer need can free up memory, which is particularly useful on mobile devices.
98
+
79
99
## Pre-loading: improve the latency and loading times
80
100
81
101
The first time music or sound is played, there can be a lag while the audio file is being prepared if you do not preload the audio. This is because the device must:
@@ -107,6 +127,10 @@ The sound will be stopped when:
107
127
* There is **an error during the loading** (in which case it will be considered as playing for a few milliseconds, then will be deemed to be stopped as it was unable to load).
108
128
* Or you used **the action** to stop a sound or music on the channel.
109
129
130
+
## Spatial sound
131
+
132
+
For games where audio should feel positioned in a 2D or 3D space, the **Spatial Sound** extension provides actions to set the position of a sound on a channel and the position of the listener. Sounds played as *music* do not support spatialization — use *sounds on channels* instead. Volume naturally attenuates with distance: at double the reference distance, the volume is halved.
133
+
110
134
## Finding audio or making your own sounds
111
135
112
136
You can use the in-built sound effect creator tool called Jfxr for making sound effects: [learn how to use Jfxr here](/gdevelop5/all-features/audio/using-jfxr).
Copy file name to clipboardExpand all lines: docs/gdevelop5/all-features/linked-objects/index.md
+22-14Lines changed: 22 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,39 +3,47 @@ title: Linked Objects
3
3
---
4
4
# Linked Objects
5
5
6
-
Actions and conditions of "Linked Objects" category allow us to make virtual connections between objects. We can later reference them by their links to each other. Typically, you can only link two objects when creating them.
6
+
Actions and conditions of the "Linked Objects" category allow you to create virtual connections between object instances. You can later retrieve those connected instances by their link, without needing to store object references in variables. Links are **bidirectional**: linking object A to object B also makes B linked to A.
7
7
8
8
!!! tip
9
9
10
-
You can also use a “For each object” event to take each instance of an object individually, and create links to other objects. Learn more about the "For each object" event by visiting [this page about For each event](/gdevelop5/events/foreach).
10
+
You can also use a "For each object" event to iterate over each instance of an object individually and create links to other objects. Learn more about the "For each object" event by visiting [this page about For each event](/gdevelop5/events/foreach).
11
11
12
12
!!! tip
13
13
14
+
Some of the linked object operations are available as both a condition and an action. The condition variant is false if no linked object was found (useful to branch logic), while the action variant always succeeds even if nothing is picked.
14
15
15
-
Some of the conditions of Linked Objects are available as both, conditions as well as actions. Conditions will be considered as false if no object is picked. If you don't want this behavior, use their action counterparts.
16
+
## Linking objects
16
17
18
+
Use the **Link two objects** action to create a connection between instances. Links are set up once — typically when an object is created — and then used repeatedly throughout the game. A single object can be linked to many others, and there is no hard limit on the number of links.
17
19
18
-
#### Link two objects
20
+
##Picking linked objects
19
21
20
-
This action creates links between the object(s) in the first parameter and the object(s) in the second parameter.
22
+
Use **Take into account linked objects** to narrow the current object selection to only instances that are linked to another specific set of objects. The picked instances then carry forward into the next actions and sub-events. This is the core mechanism for acting on relationships, for example: "for each enemy, deal damage to the health bar linked to that enemy."
21
23
22
-
#### Take into account linked objects
24
+
When used as a **condition**, it also returns false if nothing was picked — useful for checking whether a link exists at all before acting on it.
23
25
24
-
There is both an action and a condition called "Take into account linked objects".
26
+
## Removing links
25
27
26
-
This action scans through the objects in the first parameters and for each one, if there is a link registered from it to any of the objects in the second parameter, they will be picked for the next actions. After executing this action, the actions that are executed next (as well as the subevents) will only execute on the objects that were picked.
28
+
-**Unlink two objects** removes the connection between a specific pair of instances.
29
+
-**Unlink all objects from an object** removes every link associated with the given instance(s).
27
30
28
-
The condition works the same in all cases, except if no object was picked (i.e: no object in the first parameter had a link to any object in the second parameter). In such a case, the condition will be false.
31
+
When an object is **deleted from the scene**, all its links are automatically cleaned up so that other objects no longer point to the removed instance.
29
32
30
-
#### Unlink all objects from an object
33
+
##Use cases
31
34
32
-
This action removes all links to the specified object(s). They won't be virtually linked to any other objects.
35
+
Linked objects are well suited for **permanent one-to-one or one-to-many relationships** that would be cumbersome to track with variables:
33
36
34
-
#### Unlink two objects
37
+
- Attach a health bar object to a character and always update the correct bar.
38
+
- Link equipment items to the character currently holding them.
39
+
- Connect terrain tiles to the pathfinder or enemy that "owns" them, so the terrain follows when the owner moves.
40
+
- Build graph structures for AI, where each node object is linked to its neighbours.
35
41
36
-
This action removes the links between the given pair of objects.
42
+
!!! tip
43
+
44
+
For grid-based linking (rectangular, hexagonal, or isometric grids) and graph traversal, see the [Linked Objects Tools extension](/gdevelop5/all-features/extensions/linked-objects-tools).
37
45
38
-
###Examples
46
+
## Examples
39
47
40
48
In this example, for every existing "Pathfinder" object, a new "Terrain" object is created. This creation and linking step only needs to be performed one time. The bottom event is run every frame and will cause the "Terrain" objects to always follow the "Pathfinder" object they are linked to.
0 commit comments