The instance container the behavior belongs to.
The data to initialize the behavior
The runtime object the behavior belongs to.
The object owning the behavior
Tween a color object effect property.
Only used by events can be set to null
Unique id to identify the tween
The target RGB color (format "128;200;255" with values between 0 and 255 for red, green and blue)
Effect name
Property name
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween a numeric object effect property.
Only used by events can be set to null
Unique id to identify the tween
The targeted value
Effect name
Property name
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object angle.
Unique id to identify the tween
The target angle
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectAngleTween2 instead.
Tween an object angle.
Unique id to identify the tween
The target angle
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object HSL color, with the "to" color given using HSL (H: any number, S and L: 0-100).
Unique id to identify the tween
The target hue, or the same as the from color's hue if blank
include hue in calculations, as can't set this to -1 as default to ignore
The target saturation, or the same as the from color's saturation if blank
The target lightness, or the same as the from color's lightness if blank
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectColorHSLTween2 instead.
Tween an object HSL color, with the "to" color given using HSL (H: any number, S and L: 0-100).
Unique id to identify the tween
The target hue, or the same as the from color's hue if blank
include hue in calculations, as can't set this to -1 as default to ignore
The target saturation, or the same as the from color's saturation if blank
The target lightness, or the same as the from color's lightness if blank
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object color.
Unique id to identify the tween
The target RGB color (format "128;200;255" with values between 0 and 255 for red, green and blue)
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Tween using HSL color mappings, rather than direct RGB line
Use addObjectColorTween2 instead.
Tween an object color.
Unique id to identify the tween
The target RGB color (format "128;200;255" with values between 0 and 255 for red, green and blue)
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Tween using HSL color mappings, rather than direct RGB line
Tween an object depth.
Unique id to identify the tween
The target depth
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectDepthTween2 instead.
Tween an object depth.
Only used by events can be set to null
Unique id to identify the tween
The target depth
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object height.
Unique id to identify the tween
The target height
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectHeightTween2 instead.
Tween an object height.
Unique id to identify the tween
The target height
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object opacity.
Unique id to identify the tween
The target opacity
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectOpacityTween2 instead.
Tween an object opacity.
Unique id to identify the tween
The target opacity
Easing function identifier
Duration in second
Destroy this object when the tween ends
Tween an object position.
Unique id to identify the tween
The target X position
The target Y position
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectPositionTween2 instead.
Tween an object position.
Unique id to identify the tween
The target X position
The target Y position
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object X position.
Unique id to identify the tween
The target X position
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectPositionXTween2 instead.
Tween an object X position.
Unique id to identify the tween
The target X position
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object Y position.
Unique id to identify the tween
The target Y position
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectPositionYTween2 instead.
Tween an object Y position.
Unique id to identify the tween
The target Y position
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object Z position.
Unique id to identify the tween
The target Z position
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectPositionZTween2 instead.
Tween an object Z position.
Only used by events can be set to null
Unique id to identify the tween
The target Z position
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween a 3D object rotation X.
Only used by events can be set to null
Unique id to identify the tween
The target angle
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween a 3D object rotation Y.
Only used by events can be set to null
Unique id to identify the tween
The target angle
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween an object scale.
Unique id to identify the tween
The target X-scale
The target Y-scale
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Use addObjectScaleTween2 instead.
Tween an object scale.
Unique id to identify the tween
The target X-scale
The target Y-scale
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Use addObjectScaleXTween2 and addObjectScaleYTween2 instead.
Tween an object scale.
Unique id to identify the tween
The target scale
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Tween an object X-scale.
Unique id to identify the tween
The target X-scale
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Use addObjectScaleXTween2 instead.
Tween an object X-scale.
Unique id to identify the tween
The target X-scale
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Tween an object Y-scale.
Unique id to identify the tween
The target Y-scale
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Use addObjectScaleYTween2 instead.
Tween an object Y-scale.
Unique id to identify the tween
The target Y-scale
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Scale the transform from the center of the object (or point that is called center), not the top-left origin
Tween an object width.
Unique id to identify the tween
The target width
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addObjectWidthTween2 instead.
Tween an object width.
Unique id to identify the tween
The target width
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Tween a text object character size.
Unique id to identify the tween
The target character size
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addTextObjectCharacterSizeTween2 instead.
Tween a text object character size.
Unique id to identify the tween
The target character size
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
Add an object value tween.
Unique id to identify the tween
Start value
End value
Easing function identifier
Duration in seconds
Set it to true to use a exponential It's useful for values that are factors like a scale or a zoom.
Destroy this object when the tween ends
Add an object variable tween.
Unique id to identify the tween
The object variable to store the tweened value
Start value
End value
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addVariableTween3 instead. This function is misleading since one could think that the tween starts right at the moment this function is called whereas the value of the variable will change at the next frame only. Moreover, the variable will not start from the start value exactly since time will have passed at the moment the next frame is rendered. See https://github.com/4ian/GDevelop/issues/4270
Tween an object variable.
Unique id to identify the tween
The object variable to store the tweened value
End value
Easing function identifier
Duration in milliseconds
Destroy this object when the tween ends
Use addVariableTween3 instead.
Tween an object variable.
Unique id to identify the tween
The object variable to store the tweened value
End value
Easing function identifier
Duration in seconds
Destroy this object when the tween ends
This method is called each tick after events are done.
The instanceContainer owning the object
This method is called each tick before events are done.
The instanceContainer owning the object
This method is called when the owner of the behavior
is being removed from the scene and is about to be destroyed/reused later
or when the behavior is removed from an object (can happen in case of
hot-reloading only. Otherwise, behaviors are just de-activated,
not removed. See onDeActivate
).
Called at each frame after events. Call doStepPostEvents.
Behaviors writers: Please do not redefine this method. Redefine doStepPreEvents instead.
The instanceContainer owning the object
Called at each frame before events. Call doStepPreEvents.
Behaviors writers: Please do not redefine this method. Redefine doStepPreEvents instead.
The instanceContainer owning the object
Called when the behavior must be updated using the specified behaviorData. This is the case during hot-reload, and is only called if the behavior was modified.
The previous data for the behavior.
The new data for the behavior.
true if the behavior was updated, false if it could not (i.e: hot-reload is not supported).
gdjs.RuntimeBehavior#onObjectHotReloaded
Should return false
if the behavior does not need any lifecycle function to
be called.
Default, hidden, "capability" behaviors set it to false
.
This avoids useless calls to empty lifecycle functions, which would waste CPU
time (and have a sizeable impact for example when lots of static instances
are living in the scene).
RuntimeBehavior represents a behavior being used by a RuntimeObject.