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:all-features:expressions-reference [2020/12/26 13:56]
127.0.0.1 external edit
gdevelop5:all-features:expressions-reference [2021/11/22 23:06] (current)
Line 15: Line 15:
 ## Features for all objects ## Features for all objects
  
-Common features that can be used for all objects in GDevelop. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object/events|Learn more...]]+Common features that can be used for all objects in GDevelop. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/base_object/events|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 23: Line 23:
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 | `Object.Angle()` | Current angle, in degrees, of the object || | `Object.Angle()` | Current angle, in degrees, of the object ||
 +| `Object.AngleToObject(object)` | Compute the angle between two objects. If you need the angle to an arbitrary position, use AngleToPosition. ||
 +|:::| _object_ | Object |
 +| `Object.AngleToPosition(number, number)` | Compute the angle between the object center and a "target" position. If you need the angle between two objects, use AngleToObject. ||
 +|:::| _number_ | Target X position |
 +|:::| _number_ | Target Y position |
 +| `Object.CenterX()` | Return the X position of the center. ||
 +| `Object.CenterY()` | Return the Y position of the center. ||
 | `Object.Distance(object)` | Distance between two objects || | `Object.Distance(object)` | Distance between two objects ||
 |:::| _object_ | Object | |:::| _object_ | Object |
-| `Object.ForceAngle()` | Average angle of the forces || +| `Object.DistanceToPosition(number, number)` | Distance between an object and a position || 
-| `Object.ForceLength()` | Average length of the forces || +|:::| _number_ | Target X position | 
-| `Object.ForceX()` | Average coordinates of forces || +|:::| _number_ | Target Y position | 
-| `Object.ForceY()` | Average coordinates of forces ||+| `Object.ForceAngle()` | Angle of the sum of forces || 
 +| `Object.ForceLength()` | Length of the sum of forces || 
 +| `Object.ForceX()` | X coordinate of the sum of forces || 
 +| `Object.ForceY()` | Y coordinate of the sum of forces ||
 | `Object.Height()` | Height of the object || | `Object.Height()` | Height of the object ||
 | `Object.Layer()` | Return the name of the layer the object is on || | `Object.Layer()` | Return the name of the layer the object is on ||
 | `Object.ObjectName()` | Return the name of the object || | `Object.ObjectName()` | Return the name of the object ||
-| `Object.ObjectTimerElapsedTime(string)` | Value of timer ||+| `Object.ObjectTimerElapsedTime(string)` | Value of an object timer ||
 |:::| _string_ | Timer's name | |:::| _string_ | Timer's name |
 | `Object.SqDistance(object)` | Square distance between two objects || | `Object.SqDistance(object)` | Square distance between two objects ||
 |:::| _object_ | Object | |:::| _object_ | Object |
-| `Object.Variable(objectvar)` | Object'variable ||+| `Object.SqDistanceToPosition(number, number)` | Square distance between an object and a position || 
 +|:::| _number_ | Target X position | 
 +|:::| _number_ | Target Y position | 
 +| `Object.Variable(objectvar)` | Value of an object variable ||
 |:::| _objectvar_ | Variable | |:::| _objectvar_ | Variable |
-| `Object.VariableChildCount(objectvar)` | Get the number of children from an object ||+| `Object.VariableChildCount(objectvar)` | Number of children of an object variable ||
 |:::| _objectvar_ | Variable | |:::| _objectvar_ | Variable |
-| `Object.VariableString(objectvar)` | Text of variable of an object ||+| `Object.VariableString(objectvar)` | Text of an object variable ||
 |:::| _objectvar_ | Variable | |:::| _objectvar_ | Variable |
 | `Object.Width()` | Width of the object || | `Object.Width()` | Width of the object ||
 | `Object.X()` | X position of the object || | `Object.X()` | X position of the object ||
 +| `Object.XFromAngleAndDistance(number, number)` | Compute the X position when given an angle and distance relative to the starting object. This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates. ||
 +|:::| _number_ | Angle, in degrees |
 +|:::| _number_ | Distance |
 | `Object.Y()` | Y position of the object || | `Object.Y()` | Y position of the object ||
-| `Object.ZOrder()` | Z order of an object ||+| `Object.YFromAngleAndDistance(number, number)` | Compute the Y position when given an angle and distance relative to the starting object. This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates. || 
 +|:::| _number_ | Angle, in degrees | 
 +|:::| _number_ | Distance | 
 +| `Object.ZOrder()` | Z-order of an object ||
  
 --- ---
Line 53: Line 72:
 ## Sprite  ## Sprite 
  
-Animated object which can be used for most elements of a game [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/sprite|Learn more...]]+Animated object which can be used for most elements of a game [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/sprite|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 61: Line 80:
 | `Object.Direction()` | Direction of the object || | `Object.Direction()` | Direction of the object ||
 | `Object.Opacity()` | Opacity || | `Object.Opacity()` | Opacity ||
-| `Object.PointX(string)` | X position of a point || +| `Object.PointX(objectPointName)` | X position of a point || 
-|:::| _string_ | Name of the point | +|:::| _objectPointName_ | Name of the point | 
-| `Object.PointY(string)` | Y position of a point || +| `Object.PointY(objectPointName)` | Y position of a point || 
-|:::| _string_ | Name of the point |+|:::| _objectPointName_ | Name of the point |
 | `Object.ScaleX()` | Scale of the width of an object || | `Object.ScaleX()` | Scale of the width of an object ||
 | `Object.ScaleY()` | Scale of the height of an object || | `Object.ScaleY()` | Scale of the height of an object ||
Line 74: Line 93:
 ## Standard Conversions ## Standard Conversions
  
-Built-in extension providing standard conversions expressions. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/common-conversions|Learn more...]]+Expressions to convert number, texts and quantities. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/common-conversions|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 93: Line 112:
 ## Variable features ## Variable features
  
-Built-in extension allowing to manipulate variables [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables|Learn more...]]+Actions, conditions and expressions to handle variables, from simple variables like the player score, the number of remaining lives to complex variables containing arbitrary data like an inventory or the result of a web request. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 | `GlobalVariable(globalvar)` | Value of a global variable || | `GlobalVariable(globalvar)` | Value of a global variable ||
 |:::| _globalvar_ | Name of the global variable | |:::| _globalvar_ | Name of the global variable |
-| `GlobalVariableChildCount(globalvar)` | Get the number of children of a global variable ||+| `GlobalVariableChildCount(globalvar)` | Number of children of a global variable ||
 |:::| _globalvar_ | Variable | |:::| _globalvar_ | Variable |
 | `GlobalVariableString(globalvar)` | Text of a global variable || | `GlobalVariableString(globalvar)` | Text of a global variable ||
Line 104: Line 123:
 | `Variable(scenevar)` | Value of a scene variable || | `Variable(scenevar)` | Value of a scene variable ||
 |:::| _scenevar_ | Variable | |:::| _scenevar_ | Variable |
-| `VariableChildCount(scenevar)` | Get the number of children of a scene variable ||+| `VariableChildCount(scenevar)` | Number of children of a scene variable ||
 |:::| _scenevar_ | Variable | |:::| _scenevar_ | Variable |
 | `VariableString(scenevar)` | Text of a scene variable || | `VariableString(scenevar)` | Text of a scene variable ||
Line 112: Line 131:
  
  
-## Mouse features+## Mouse and touch
  
-Built-in extension that enables the use of a mouse [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/mouse-touch|Learn more...]]+Conditions and actions to handle either the mouse or touches on touchscreen. By default, conditions related to the mouse will also handle the touches - so that it's easier to handle both in your game. You can disable this behavior if you want to handle them separately in different events. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/mouse-touch|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 120: Line 139:
 | `LastTouchId()` | Identifier of the last touch || | `LastTouchId()` | Identifier of the last touch ||
 | `MouseWheelDelta()` | Mouse wheel displacement || | `MouseWheelDelta()` | Mouse wheel displacement ||
-| `MouseX(layer, camera)` | Cursor X position || +| `MouseX(layer, number)` | Return the X position of the cursor or of a touch. || 
-|:::| _layer_ | Layer _Optional_. | +|:::| _layer_ | Layer (base layer if empty) _Optional_. | 
-|:::| _camera_ | Camera _Optional_. | +|:::| _number_ | Camera number (default : 0) _Optional_. | 
-| `MouseY(layer, camera)` | Cursor Y position || +| `MouseY(layer, number)` | Return the Y position of the cursor or of a touch. || 
-|:::| _layer_ | Layer _Optional_. | +|:::| _layer_ | Layer (base layer if empty) _Optional_. | 
-|:::| _camera_ | Camera _Optional_. | +|:::| _number_ | Camera number (default : 0) _Optional_. | 
-| `TouchX(number, layer, camera)` | Touch X position ||+| `TouchX(number, layer, number)` | Return the X position of a specific touch. ||
 |:::| _number_ | Touch identifier | |:::| _number_ | Touch identifier |
-|:::| _layer_ | Layer _Optional_. | +|:::| _layer_ | Layer (base layer if empty) _Optional_. | 
-|:::| _camera_ | Camera _Optional_. | +|:::| _number_ | Camera number (default : 0) _Optional_. | 
-| `TouchY(number, layer, camera)` | Touch Y position ||+| `TouchY(number, layer, number)` | Return the Y position of a specific touch. ||
 |:::| _number_ | Touch identifier | |:::| _number_ | Touch identifier |
-|:::| _layer_ | Layer _Optional_. | +|:::| _layer_ | Layer (base layer if empty) _Optional_. | 
-|:::| _camera_ | Camera _Optional_. |+|:::| _number_ | Camera number (default : 0) _Optional_. |
  
 --- ---
Line 140: Line 159:
 ## Keyboard features ## Keyboard features
  
-Built-in extension that enables the use of keyboard [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/keyboard|Learn more...]]+Allows your game to respond to keyboard input. Note that this does not work with on-screen keyboard on touch devices: use instead conditions related to touch when making game for mobile/touchscreen devices. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/keyboard|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 150: Line 169:
 ## Scene management features ## Scene management features
  
-Built-in extension allowing to manipulate scenes and providing common features +Actions and conditions to manipulate the scenes during the game. 
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 174: Line 193:
 ## Time ## Time
  
-Built-in extension providing actions and conditions related to time. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/timers|Learn more...]]+Actions and conditions to run timers, get the current time or modify the time scale (speed at which the game is running - useful for slow motion effects). [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/timers|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 181: Line 200:
 | `TimeDelta()` | Time elapsed since the last frame rendered on screen || | `TimeDelta()` | Time elapsed since the last frame rendered on screen ||
 | `TimeFromStart()` | Time elapsed since the beginning of the scene || | `TimeFromStart()` | Time elapsed since the beginning of the scene ||
 +| `TimeScale()` | Returns the time scale of the scene. ||
 | `TimerElapsedTime(string)` | Value of a scene timer || | `TimerElapsedTime(string)` | Value of a scene timer ||
 |:::| _string_ | Timer's name | |:::| _string_ | Timer's name |
Line 189: Line 209:
 ## Mathematical tools ## Mathematical tools
  
-Built-in extension providing mathematical tools +A set of mathematical functions that can be used in expressions. 
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 +| `AngleBetweenPositions(number, number, number, number)` | Compute the angle between two positions. ||
 +|:::| _number_ | First point X position |
 +|:::| _number_ | First point Y position |
 +|:::| _number_ | Second point X position |
 +|:::| _number_ | Second point Y position |
 | `AngleDifference(number, number)` | Difference between two angles || | `AngleDifference(number, number)` | Difference between two angles ||
 |:::| _number_ | First angle | |:::| _number_ | First angle |
 |:::| _number_ | Second angle | |:::| _number_ | Second angle |
 +| `DistanceBetweenPositions(number, number, number, number)` | Compute the distance between two positions. ||
 +|:::| _number_ | First point X position |
 +|:::| _number_ | First point Y position |
 +|:::| _number_ | Second point X position |
 +|:::| _number_ | Second point Y position |
 +| `XFromAngleAndDistance(number, number)` | Compute the X position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates. ||
 +|:::| _number_ | Angle, in degrees |
 +|:::| _number_ | Distance |
 +| `YFromAngleAndDistance(number, number)` | Compute the Y position when given an angle and distance relative to the origin (0;0). This is also known as getting the cartesian coordinates of a 2D vector, using its polar coordinates. ||
 +|:::| _number_ | Angle, in degrees |
 +|:::| _number_ | Distance |
 | `abs(number)` | Absolute value || | `abs(number)` | Absolute value ||
 |:::| _number_ | Expression | |:::| _number_ | Expression |
Line 232: Line 268:
 | `floor(number)` | Round number down to an integer || | `floor(number)` | Round number down to an integer ||
 |:::| _number_ | Expression | |:::| _number_ | Expression |
-| `lerp(number, number, number)` | Linearly interpolate a to b by x (in a+(b-a) * x) |+| `lerp(number, number, number)` | Linearly interpolate a to b by x || 
-|:::| _number_ | a Start state | +|:::| _number_ | a (in a+(b-a) * x) | 
-|:::| _number_ | End state  +|:::| _number_ | b (in a+(b-a) * x) 
-|:::| _number_ | x Time |+|:::| _number_ | x (in a+(b-a) * x) |
 | `log(number)` | Logarithm || | `log(number)` | Logarithm ||
 |:::| _number_ | Expression | |:::| _number_ | Expression |
Line 251: Line 287:
 |:::| _number_ | x (as in x mod y) | |:::| _number_ | x (as in x mod y) |
 |:::| _number_ | y (as in x mod y) | |:::| _number_ | y (as in x mod y) |
 +| `normalize(number, number, number)` | Remap a value between 0 and 1. ||
 +|:::| _number_ | Value |
 +|:::| _number_ | Min |
 +|:::| _number_ | Max |
 | `nthroot(number, number)` | Nth root of a number || | `nthroot(number, number)` | Nth root of a number ||
 |:::| _number_ | Number | |:::| _number_ | Number |
Line 281: Line 321:
 ## Cameras and layers features ## Cameras and layers features
  
-Built-in camera extension [[http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layers-and-cameras|Learn more...]]+Each scene can be composed of multiple layers. These conditions and actions allow to manipulate them during the game. In particular, you can move the camera of a layer to center it on an object or a position. [[http://wiki.compilgames.net/doku.php/gdevelop5/interface/scene-editor/layers-and-cameras|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
-| `CameraHeight(layer, number)` | Height of a camera of a layer || +| `CameraAngle(layer, number)` | Return the angle of rotation of a camera|| 
-|:::| _layer_ | Layer +|:::| _layer_ | Layer (base layer if empty) _Optional_. |
-|:::| _number_ | Camera number (default : 0) | +
-| `CameraRotation(layer, number)` | Angle of a camera of a layer || +
-|:::| _layer_ | Layer _Optional_. |+
 |:::| _number_ | Camera number (default : 0) _Optional_. | |:::| _number_ | Camera number (default : 0) _Optional_. |
-| `CameraWidth(layer, number)` | Width of a camera of a layer || +| `CameraHeight(layer, number)` | Return the height of a camera of a layer|| 
-|:::| _layer_ | Layer | +|:::| _layer_ | Layer (base layer if empty) 
-|:::| _number_ | Camera number (default 0) | +|:::| _number_ | Camera number 
-| `CameraX(layer, number)` | Camera X position || +| `CameraWidth(layer, number)` | Return the width of a camera of a layer. || 
-|:::| _layer_ | Layer _Optional_. |+|:::| _layer_ | Layer (base layer if empty
 +|:::| _number_ | Camera number 
 +| `CameraX(layer, number)` | Return the X position of the center of a camera. || 
 +|:::| _layer_ | Layer (base layer if empty) _Optional_. |
 |:::| _number_ | Camera number (default : 0) _Optional_. | |:::| _number_ | Camera number (default : 0) _Optional_. |
-| `CameraY(layer, number)` | Camera Y position ||+| `CameraY(layer, number)` | Return the Y position of the center of a camera. || 
 +|:::| _layer_ | Layer (base layer if empty) _Optional_. | 
 +|:::| _number_ | Camera number (default : 0) _Optional_. | 
 +| `CameraZoom(layer, number)` | Zoom of a camera of a layer ||
 |:::| _layer_ | Layer _Optional_. | |:::| _layer_ | Layer _Optional_. |
 |:::| _number_ | Camera number (default : 0) _Optional_. | |:::| _number_ | Camera number (default : 0) _Optional_. |
-| `LayerTimeScale(layer)` | Time scale ||+| `LayerDefaultZOrder(layer)` | Default Z Order for a layer || 
 +|:::| _layer_ | Layer | 
 +| `LayerTimeScale(layer)` | Returns the time scale of the specified layer. ||
 |:::| _layer_ | Layer | |:::| _layer_ | Layer |
  
Line 307: Line 352:
 ## Audio ## Audio
  
-Builtin audio extension [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/audio|Learn more...]]+GDevelop provides several conditions and actions to play audio files. They can be either long musics or short sound effects. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/audio|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 329: Line 374:
 ## Basic internet features ## Basic internet features
  
-Built-in extension providing network features. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/network|Learn more...]]+Features to send web requests, communicate with external "APIs" and other network related tasks. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/network|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 345: Line 390:
 ## Window features ## Window features
  
-Built-in extension allowing to manipulate the game window and canvas [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/window|Learn more...]]+Provides actions and conditions to manipulate the game window. Depending on the platform on which the game is running, not all of these features can be applied. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/window|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 359: Line 404:
 ## Text manipulation ## Text manipulation
  
-Built-in extension providing expressions for manipulating text objects+Provides expressions to manipulate strings (also called texts)
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 401: Line 446:
 ## Advanced control features ## Advanced control features
  
-Built-in extension providing advanced control features. +Advanced control features to be used in events
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 415: Line 460:
 ## Platform (from extension Platform Behavior) ## Platform (from extension Platform Behavior)
  
-Platform that Platformer characters can run on. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/platformer|Learn more...]]+Platform that Platformer characters can run on. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/platformer|Read more explanations about it.]]
  
 _No expressions for this behavior._ _No expressions for this behavior._
Line 422: Line 467:
 ## Platformer character (from extension Platform Behavior) ## Platformer character (from extension Platform Behavior)
  
-Controllable character that can jump and run on platforms. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/platformer|Learn more...]]+Controllable character that can jump and run on platforms. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/platformer|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 443: Line 488:
 ## Destroy when outside of the screen (from extension Destroy Outside Screen Behavior) ## Destroy when outside of the screen (from extension Destroy Outside Screen Behavior)
  
-Automatically destroy the object when it goes outside of the screen's borders. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/destroyoutside|Learn more...]]+Automatically destroy the object when it goes outside of the screen's borders. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/destroyoutside|Read more explanations about it.]]
  
 _No expressions for this behavior._ _No expressions for this behavior._
Line 454: Line 499:
 ## Tiled Sprite (from extension Tiled Sprite Object) ## Tiled Sprite (from extension Tiled Sprite Object)
  
-Displays an image repeated over an area [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/tiled_sprite|Learn more...]]+Displays an image repeated over an area[[http://wiki.compilgames.net/doku.php/gdevelop5/objects/tiled_sprite|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 465: Line 510:
 ## Draggable object (from extension Draggable Behavior) ## Draggable object (from extension Draggable Behavior)
  
-Allows objects to be moved using the mouse (or touch). [[http://wiki.compilgames.net/doku.php/gdevelop5behaviors/draggable|Learn more...]]+Allows objects to be moved using the mouse (or touch). [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/draggable|Read more explanations about it.]]
  
 _No expressions for this behavior._ _No expressions for this behavior._
Line 476: Line 521:
 ## Top-down movement (4 or 8 directions) (from extension Top-down movement) ## Top-down movement (4 or 8 directions) (from extension Top-down movement)
  
-The object can be moved left, up, right, and down (and, optionally, diagonally). [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/topdown|Learn more...]]+Objects with this behavior can be moved left, up, right, and down (and, optionally, diagonally). [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/topdown|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 485: Line 530:
 | `Object.TopDownMovement::Deceleration()` | Deceleration of the object || | `Object.TopDownMovement::Deceleration()` | Deceleration of the object ||
 | `Object.TopDownMovement::MaxSpeed()` | Maximum speed of the object || | `Object.TopDownMovement::MaxSpeed()` | Maximum speed of the object ||
 +| `Object.TopDownMovement::MovementAngleOffset()` | Return the movement angle offset. ||
 | `Object.TopDownMovement::Speed()` | Speed of the object || | `Object.TopDownMovement::Speed()` | Speed of the object ||
 | `Object.TopDownMovement::XVelocity()` | Speed on the X axis of the movement || | `Object.TopDownMovement::XVelocity()` | Speed on the X axis of the movement ||
Line 495: Line 541:
 ## Text (from extension Text object) ## Text (from extension Text object)
  
-Displays a text [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/text|Learn more...]]+Displays a text on the screen. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/text|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 | `Object.Angle()` | Angle || | `Object.Angle()` | Angle ||
 +| `Object.FontSize()` | Return the font size of a text object. ||
 | `Object.Opacity()` | Opacity of a Text object || | `Object.Opacity()` | Opacity of a Text object ||
 | `Object.Padding()` | Padding || | `Object.Padding()` | Padding ||
Line 511: Line 558:
 ## Particles emitter (from extension Particle system) ## Particles emitter (from extension Particle system)
  
-Displays a large number of small particles to create visual effects. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/particles_emitter|Learn more...]]+Displays a large number of small particles to create visual effects. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/particles_emitter|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 +| `Object.CurrentParticleCount()` | Number of particles currently displayed ||
 | `Object.EmitterAngle()` | Emission angle || | `Object.EmitterAngle()` | Emission angle ||
 | `Object.EmitterAngleA()` | Emission angle A || | `Object.EmitterAngleA()` | Emission angle A ||
Line 520: Line 568:
 | `Object.EmitterForceMin()` | Emission minimal force || | `Object.EmitterForceMin()` | Emission minimal force ||
 | `Object.Flow()` | Flow || | `Object.Flow()` | Flow ||
-| `Object.NbParticles()` | Particles number || 
 | `Object.ParticleAlpha1()` | Parameter 1 of transparency || | `Object.ParticleAlpha1()` | Parameter 1 of transparency ||
 | `Object.ParticleAlpha2()` | Parameter 2 of transparency || | `Object.ParticleAlpha2()` | Parameter 2 of transparency ||
Line 549: Line 596:
 ## Panel Sprite ("9-patch") (from extension Panel Sprite (9-patch) Object) ## Panel Sprite ("9-patch") (from extension Panel Sprite (9-patch) Object)
  
-An image with edges and corners that are stretched separately from the full image. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/panel_sprite|Learn more...]]+An image with edges and corners that are stretched separately from the full image. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/panel_sprite|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 560: Line 607:
 ## Anchor  ## Anchor 
  
-Behavior that anchors objects to the window's bounds. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/anchor|Learn more...]]+Behavior that anchors objects to the window's bounds. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/anchor|Read more explanations about it.]]
  
 _No expressions for this behavior._ _No expressions for this behavior._
Line 569: Line 616:
  
  
-## Shape painter (from extension Primitive drawing)+## Shape painter 
  
-Allows you to draw simple shapes on the screen [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/shape_painter|Learn more...]] +Allows you to draw simple shapes on the screen [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/shape_painter|Read more explanations about it.]]
- +
-_No expressions for this object._+
  
 +^ Expression ^ Description ^  ^
 +| `Object.FillColorBlue()` | Filing color blue component ||
 +| `Object.FillColorGreen()` | Filing color green component ||
 +| `Object.FillColorRed()` | Filing color red component ||
 +| `Object.FillOpacity()` | Filling opacity ||
 +| `Object.OutlineColorBlue()` | Outline color blue component ||
 +| `Object.OutlineColorGreen()` | Outline color green component ||
 +| `Object.OutlineColorRed()` | Outline color red component ||
 +| `Object.OutlineOpacity()` | Outline opacity ||
 +| `Object.OutlineSize()` | Outline size ||
  
 --- ---
Line 582: Line 637:
 ## Text entry (from extension Text entry object) ## Text entry (from extension Text entry object)
  
-Invisible object used to get the text entered with the keyboard [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/text_entry|Learn more...]]+Invisible object used to get the text entered with the keyboard[[http://wiki.compilgames.net/doku.php/gdevelop5/objects/text_entry|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 592: Line 647:
 ## Inventory ## Inventory
  
-Provides actions and conditions to add an inventory to your game, with items in memory. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/inventory|Learn more...]]+Provides actions and conditions to add an inventory to your game, with items in memory. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/inventory|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 605: Line 660:
 ## Pathfinding (from extension Pathfinding behavior) ## Pathfinding (from extension Pathfinding behavior)
  
-With this, characters will move while avoiding all objects that are flagged as obstacles. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/pathfinding|Learn more...]]+With this behaviorthe object will move while avoiding all objects that are flagged as obstacles. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/pathfinding|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 620: Line 675:
 | `Object.Pathfinding::GetNodeY(number)` | Get next waypoint Y position || | `Object.Pathfinding::GetNodeY(number)` | Get next waypoint Y position ||
 |:::| _number_ | Node index (start at 0!) | |:::| _number_ | Node index (start at 0!) |
 +| `Object.Pathfinding::GridOffsetX()` | Return X offset of the virtual grid. ||
 +| `Object.Pathfinding::GridOffsetY()` | Return Y offset of the virtual grid. ||
 | `Object.Pathfinding::LastNodeX()` | Last waypoint X position || | `Object.Pathfinding::LastNodeX()` | Last waypoint X position ||
 | `Object.Pathfinding::LastNodeY()` | Last waypoint Y position || | `Object.Pathfinding::LastNodeY()` | Last waypoint Y position ||
 | `Object.Pathfinding::MaxSpeed()` | Maximum speed of the object on the path || | `Object.Pathfinding::MaxSpeed()` | Maximum speed of the object on the path ||
 +| `Object.Pathfinding::MovementAngle()` | Angle of movement on its path ||
 | `Object.Pathfinding::NextNodeIndex()` | Get the index of the next waypoint to reach || | `Object.Pathfinding::NextNodeIndex()` | Get the index of the next waypoint to reach ||
 | `Object.Pathfinding::NextNodeX()` | Get next waypoint X position || | `Object.Pathfinding::NextNodeX()` | Get next waypoint X position ||
Line 631: Line 689:
 ## Obstacle for pathfinding (from extension Pathfinding behavior) ## Obstacle for pathfinding (from extension Pathfinding behavior)
  
-Flag the object as being an obstacle for pathfinding. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/pathfinding|Learn more...]]+Flag the object as being an obstacle for pathfinding. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/pathfinding|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 642: Line 700:
 ## Physics Engine (from extension Physics Engine (deprecated)) ## Physics Engine (from extension Physics Engine (deprecated))
  
-Make objects move as if they are subject to the laws of physics. If you're creating a new game, prefer Physics Engine 2.0 [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/physics|Learn more...]]+Make objects move as if they are subject to the laws of physics. If you're creating a new game, prefer Physics Engine 2.0 [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/physics|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 672: Line 730:
 ## BBText (from extension BBCode Text Object) ## BBText (from extension BBCode Text Object)
  
-Displays a rich text label using BBCode markup (allowing to set parts of the text as bold, italic, use different colors and shadows). [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/bbtext|Learn more...]]+Displays a rich text label using BBCode markup (allowing to set parts of the text as bold, italic, use different colors and shadows). [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/bbtext|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 680: Line 738:
 | `Object.GetOpacity()` | Get the base opacity || | `Object.GetOpacity()` | Get the base opacity ||
 | `Object.GetWrappingWidth()` | Get the wrapping width || | `Object.GetWrappingWidth()` | Get the wrapping width ||
 +
 +---
 +
 +
 +
 +## Bitmap Text 
 +
 +Displays a text using a "Bitmap Font" (an image representing characters). This is more performant than a traditional Text object and it allows for complete control on the characters aesthetic. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/bitmap_text|Read more explanations about it.]]
 +
 +^ Expression ^ Description ^  ^
 +| `Object.Alignment()` | Return the text alignment. ||
 +| `Object.FontName()` | Return the font name (defined in the Bitmap font). ||
 +| `Object.FontSize()` | Return the font size, defined in the Bitmap Font. ||
 +| `Object.Opacity()` | Return the opacity, between 0 (fully transparent) and 255 (opaque). ||
 +| `Object.Scale()` | Return the scale (1 by default). ||
 +| `Object.Text()` | Return the text. ||
 +| `Object.WrappingWidth()` | Return the width, in pixels, after which the text is wrapped on next line. ||
  
 --- ---
Line 686: Line 761:
 ## Device sensors ## Device sensors
  
-Allow the game to access the sensors of a mobile device. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/device-sensors|Learn more...]]+Allow the game to access the sensors of a mobile device. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/device-sensors|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 705: Line 780:
 ## Dialogue Tree (Experimental) ## Dialogue Tree (Experimental)
  
-Start dialogue trees, made using Yarn, powered by Bondage.jsExperimental extension that can change in the future. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/dialogue-tree|Learn more...]]+Handle dialogue trees, made using Yarn SpinnerUseful to make complex dialogues with multiple choicesThe Yarn Spinner editor is embedded in GDevelop so you can edit your dialogues without leaving GDevelop. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/dialogue-tree|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 737: Line 812:
 ## Facebook Instant Games ## Facebook Instant Games
  
-Allow your game to send scores and interact with Facebook Instant Games [[http://wiki.compilgames.net/doku.php/gdevelop5/publishing/publishing-to-facebook-instant-games|Learn more...]]+Allow your game to send scores and interact with the Facebook Instant Games platform. [[http://wiki.compilgames.net/doku.php/gdevelop5/publishing/publishing-to-facebook-instant-games|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 748: Line 823:
 ## Filesystem ## Filesystem
  
-Access the filesystem of the operating system. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/filesystem|Learn more...]]+Access the filesystem of the operating system. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/filesystem|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 766: Line 841:
 | `FileSystem::UserHomePath()` | Get the path to the user home folder. || | `FileSystem::UserHomePath()` | Get the path to the user home folder. ||
 | `FileSystem::UserdataPath()` | Get the path to userdata folder (for application settings). || | `FileSystem::UserdataPath()` | Get the path to userdata folder (for application settings). ||
 +
 +---
 +
 +
 +## Firebase
 +
 +Use Google Firebase services (database, functions, storage...) in your game. [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/firebase|Read more explanations about it.]]
 +
 +^ Expression ^ Description ^  ^
 +| `Firebase::GetAccountCreationTime()` | Gets the accounts creation time. ||
 +| `Firebase::GetAuthToken(string)` | Get the user authentififcation token. The token is the proof of authentication. ||
 +|:::| _string_ | Setting Name |
 +| `Firebase::GetLastLoginTime()` | Gets the user last login time. ||
 +| `Firebase::GetPhoneNumber()` | Gets the user phone number. ||
 +| `Firebase::GetPhotoURL()` | Gets an URL to the user profile picture. ||
 +| `Firebase::GetRefreshToken()` | Gets the user refresh token. For advanced usage only. ||
 +| `Firebase::GetRemoteConfigNumber(string)` | Get a setting from Firebase Remote Config as Number. ||
 +|:::| _string_ | Setting Name |
 +| `Firebase::GetRemoteConfigString(string)` | Get a setting from Firebase Remote Config as a string. ||
 +|:::| _string_ | Setting Name |
 +| `Firebase::GetTenantID()` | Gets the user tenant ID. For advanced usage only. ||
 +| `Firebase::GetUserDisplayName()` | Gets the user display name. ||
 +| `Firebase::GetUserEmail()` | Gets the user email address. ||
 +| `Firebase::GetUserUID()` | Gets the user Unique IDentifier. Use that to link data to an user instead of the name or email. ||
 +| `Firebase::ServerTimestamp()` | Set a field to the timstamp on the server when the request arrives there ||
  
 --- ---
Line 790: Line 890:
 ## Peer-to-Peer communication (experimental) ## Peer-to-Peer communication (experimental)
  
-Allow game instances to communicate remotely using messages sent via WebRTC (P2P) [[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/p2p|Learn more...]]+Allow game instances to communicate remotely using messages sent via WebRTC (P2P)[[http://wiki.compilgames.net/doku.php/gdevelop5/all-features/p2p|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
 | `P2P::GetEventData(string)` | Returns the data received when the specified event was last triggered || | `P2P::GetEventData(string)` | Returns the data received when the specified event was last triggered ||
 +|:::| _string_ | Event name |
 +| `P2P::GetEventSender(string)` | Returns the id of the peer that triggered the event ||
 |:::| _string_ | Event name | |:::| _string_ | Event name |
 | `P2P::GetID()` | Gets the client ID of the current game instance || | `P2P::GetID()` | Gets the client ID of the current game instance ||
Line 806: Line 908:
 ## Physics Engine 2.0  ## Physics Engine 2.0 
  
-Simulate realistic object physics, with gravity, forces, joints, etc. +Simulate realistic object physics, with gravity, forces, joints, etc. [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/physics2|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 830: Line 932:
 |:::| _number_ | Joint ID | |:::| _number_ | Joint ID |
 | `Object.Physics2::GravityScale()` | Get the gravity scale of an object. || | `Object.Physics2::GravityScale()` | Get the gravity scale of an object. ||
-| `Object.Physics2::GravityX()` | Gravity X || +| `Object.Physics2::GravityX()` | World gravity on axis || 
-| `Object.Physics2::GravityY()` | Gravity Y ||+| `Object.Physics2::GravityY()` | World gravity on axis ||
 | `Object.Physics2::JointFirstAnchorX(number)` | Joint first anchor X || | `Object.Physics2::JointFirstAnchorX(number)` | Joint first anchor X ||
 |:::| _number_ | Joint ID | |:::| _number_ | Joint ID |
Line 923: Line 1025:
 | `Object.Physics2::RopeJointMaxLength(number)` | Rope joint maximum length || | `Object.Physics2::RopeJointMaxLength(number)` | Rope joint maximum length ||
 |:::| _number_ | Joint ID | |:::| _number_ | Joint ID |
-| `Object.Physics2::TimeScale()` | Time scale ||+| `Object.Physics2::TimeScale()` | World time scale ||
 | `Object.Physics2::WeldJointDampingRatio(number)` | Weld joint damping ratio || | `Object.Physics2::WeldJointDampingRatio(number)` | Weld joint damping ratio ||
 |:::| _number_ | Joint ID | |:::| _number_ | Joint ID |
Line 951: Line 1053:
  
  
-## Tween (from extension Tween animation)+## Tilemap  
 + 
 +Displays a tiled-based map, made with the Tiled editor (download it separately on https://www.mapeditor.org/). [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/tilemap|Read more explanations about it.]] 
 + 
 +^ Expression ^ Description ^  ^ 
 +| `Object.AnimationFps()` | Get the animation speed (in frames per second) || 
 +| `Object.AnimationSpeedScale()` | Get the Animation speed scale || 
 +| `Object.LayerIndex()` | Get the layer index being displayed || 
 + 
 +--- 
 + 
 + 
 + 
 +## Tween (from extension Tweening)
  
-Smoothly animate position, angle, scale and other properties of the object [[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/tween|Learn more...]]+Smoothly animate position, angle, scale and other properties of the object[[http://wiki.compilgames.net/doku.php/gdevelop5/behaviors/tween|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^
Line 965: Line 1080:
 ## Video  ## Video 
  
-Displays a video. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/video|Learn more...]]+Displays a video. [[http://wiki.compilgames.net/doku.php/gdevelop5/objects/video|Read more explanations about it.]]
  
 ^ Expression ^ Description ^  ^ ^ Expression ^ Description ^  ^