User Tools

Site Tools


en:orx:config:settings_structure:orxobject

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:orx:config:settings_structure:orxobject [2017/05/29 21:50 (7 years ago)] – external edit 127.0.0.1en:orx:config:settings_structure:orxobject [2023/08/24 00:24 (7 months ago)] (current) sausage
Line 3: Line 3:
 ==== Summary ==== ==== Summary ====
  
-<code ini>[ObjectTemplate] +<code ini> 
-Alpha              = <float> +[ObjectTemplate] 
-AngularVelocity    = <float> +Graphic            GraphicTemplate
-AnimationFrequency <float>+
 AnimationSet       = AnimationSetTemplate AnimationSet       = AnimationSetTemplate
-AutoScroll         x | y | both +AnimationFrequency <float>
-BlendMode          = alpha | multiply | add | none+
 Body               = BodyTemplate Body               = BodyTemplate
-ChildList          ObjectTemplate1 # ObjectTemplate2 +Group              <string>
-ChildJointList     = JointTemplate1 # JointTemplate2+
 Clock              = ClockTemplate Clock              = ClockTemplate
 +LifeTime           = anim | child | fx | sound | spawn | track | <float>
 +Age                = <float>
 Color              = <vector> Color              = <vector>
-DepthScale         = <bool+RGB                = <vector
-Graphic            GraphicTemplate +HSL                <vector> 
-Group              = <string>+HSV                = <vector> 
 +Alpha              = <float> 
 +AutoScroll         = x | y | both
 Flip               = x | y | both Flip               = x | y | both
-FXList             = FXTemplate1 # FXTemplate2 +DepthScale         = <bool
-LifeTime           = <float> +Position           ((center (truncate | round)) (left | right) (top | bottom) | <vector> 
-ParentCamera       = CameraTemplate +SphericalPosition  = <vector>
-Position           = <vector> +
-Repeat             = <vector+
-Rotation           = <float>+
 Speed              = <vector> Speed              = <vector>
-Scale              = <vector> <float+Pivot              (center (truncate | round)) (left | right) (top | bottom) | <vector> 
-ShaderList         ShaderTemplate1 # ShaderTemplate2 +Size               <vector
-TrackList          TimeLineTrackTemplate1 # TimeLineTrackTemplate2 +UseRelativeSpeed   <bool> 
-SoundList          SoundTemplate1 # SoundTemplate2 +Rotation           <float> 
-Spawner            SpawnerTemplate+AngularVelocity    <float> 
 +Scale              <vector>
 Smoothing          = <bool> Smoothing          = <bool>
-UseParentSpace     = <bool>none | position | scale | both +BlendMode          = alpha | multiply | add | premul | none 
-UseRelativeSpeed   = <bool></code> +Repeat             = <vector> 
 +FXList             = FXTemplate1 # ... # FXTemplateN 
 +FXRecursiveList    = <bool> 
 +FXFrequency        = <float> 
 +SoundList          = SoundTemplate1 # ... # SoundTemplateN 
 +ShaderList         = ShaderTemplate1 # ... # ShaderTemplateN 
 +TrackList          = TimeLineTrackTemplate1 # ... # TimeLineTrackTemplateN 
 +Spawner            = SpawnerTemplate 
 +ChildList          = ObjectTemplate1 # ... # ObjectTemplateN 
 +ChildJointList     = JointTemplate1 # ... # JointTemplateN 
 +ParentCamera       = CameraTemplate 
 +UseParentSpace     = true false | both | position | scale | none 
 +IgnoreFromParent   = none | all | rotation | scale<.xyz> 
 +OnPrepare          = <command> 
 +OnCreate           = <command> 
 +OnDelete           = <command> 
 +</code>
  
 ==== Details ==== ==== Details ====
  
 Here's a list of the available properties for an ''orxOBJECT'' structure: Here's a list of the available properties for an ''orxOBJECT'' structure:
-  * ''Alpha'': Opacity of the object. Its value should be between 0.0 and 1.0. By default, its value is 1.0 (fully opaque). + 
-  * ''AngularVelocity'': Initial angular velocity for this object, in degrees/secondBy default its value is 0°/s+  * ''Group'': GroupId from the GroupList for the object to be rendered into (like a layer). Defaults to ''default'' group
-  * ''AnimationFrequency'': Relative frequency at which animations should be played on this object. This acts as a multiplier on the original frequency of played [[orxANIM|animations]]By default its value is 1.0. +  * ''Clock'':  Associates the corresponding clock and creates it if needed. Associated clocks are useful to achieve time localized stretching (only for the corresponding object)When an object is time strectched by an associated clock, all its properties will behave accordingly (spawners, FXs, physics and sound pitch). If no clock is specified the main clock (core) will be used for update calculations
-  * ''AnimationSet'': Config name of the animation set to use for this object (see [[orxANIM|orxANIM section]]). If none is provided, no animation will be available for this objectIn order to use an ''AnimationsSet'', a valid [[orxGRAPHIC]] has to be provided for the ''Graphic'' property+  * ''LifeTime'': Multiple literals can be defined at once, in which case the object will be deleted when all of their associated conditions are fulfilledIf the value is numeric, the object will be deleted after that duration (in seconds)If not defined or negative value, infinite life is granted. 0 means it'll be instantly deleted. It'default value is -1.0, which means the object has an infinite life time. ''child'' keeps the object alive as long as there are owned children; ''fx'' keeps the object alive as long as there are FXs; ''sound'' keeps the object alive as long as there are sounds; ''spawn'' keeps the object alive as long as spawner isn't depleted (based on TotalObject); ''track'' keeps the object alive as long as there are tracks
-  * ''AutoScroll'': Defines if this object should have an automated differential scrolling rendering depending on its relative depth (Z axis) to the cameraIf can be defined for the ''X'' axis or the ''Y'' axis or even ''both'' at sametime. If none is provided, no differential scrolling will be used for this object (ie. default plain rendering position).+  * ''Age'': If defined, object will seem to be [Age] old upon creation, in seconds. 
 +  * ''Color'': Defines a color (ie. tint) to apply on this object when rendered. Values are RGB from 0 to 255. Official HTML web color names are also supported (this list can be extended through the Color config section). This color will override any color defined in the current rendered [[orxGRAPHIC]] for this object. If none is provided, the color of the current [[orxGRAPHIC]] will be used is available, the white color (ieno tint) will be used otherwise. 
 +  * ''RGB'': Values are RGB from 0.0 to 1.0. Will be used only if Color isn't defined. 
 +  * ''HSL'': Values are HSL from 0.0 to 1.0. Will be used only if Color and RGB aren't defined. 
 +  * ''HSV'': Values are HSV from 0.0 to 1.0. Will be used only if Color, RGB and HSL aren't defined
 +  * ''Flip'': Defines if the object should be flipped when rendered. Flipping only affects the visualProperties like physics body won't be affected. It can be flipped on either ''X'' axis or ''Y'' axis or on the ''both'' axes at the same time. If no value is provided, no flipping will occur. 
 +  * ''Position'': Initial position for this object, in pixels. If an object has a parent, this value will be considered in parent's space instead than in world space. By default its value is (0.0, 0.0, 0.0). An optional placement pivot "override" (literals or vector) can be provided at the beginning, followed by '->'. If a parent is available, the position (literals with optional offset or vector) can be expressed in the parent space with UseParentSpace, ie. [0-1] map to the parent's size on each axis. 
 +  * ''SphericalPosition'': Theta & Phi components are in degrees. Will be used only if Position isn't defined. 
 +  * ''Pivot'': Normally this is defined in the Object's ''Graphic'' section. However, setting Pivot here overrides graphic's value if present. ''truncate'' and ''round'' will adjust pivot values if they are not integers. z is ignored for 2D graphics. 
 +  * ''Size'': Overrides graphic's value if present. 
 +  * ''UseRelativeSpeed'': If true, the initial speed will be applied relatively to current object rotation & scale. Defaults to false. 
 +  * ''Rotation'': Initial 2D angle in degrees around z axis. If an object has a parent, this value will be considered in parent's space instead than in world space. By default its value is 0.0. 
 +  * ''AngularVelocity'': Initial velocity in degrees/second around z axis. By default its value is 0°/s 
 +  * ''Scale'': Initial scale for this object (Z component being ignored)By default its value is 1.0 (ie. (1.0, 1.0, 0.0). If it has a valid parent and use its space, this value will be considered in parent's space, ie. [0-1] defines parent size on each axis. 
 +  * ''Smoothing'': Specifies if the graphic object should be rendered with antialising or not. This property is overridden by the current [[orxGRAPHIC]] used for this object. By default its value is default which means the [[en:orx:config:settings_main:main#display_module|global display setting value]] will be used.
   * ''BlendMode'': Defines which [[wp>Blend_modes|blend mode]] will be used when rendering this object. By default its value is alpha, which means the alpha channel will be used as opacity value. This rendering parameter can be overridden by the current rendered [[orxGRAPHIC|graphic object]].   * ''BlendMode'': Defines which [[wp>Blend_modes|blend mode]] will be used when rendering this object. By default its value is alpha, which means the alpha channel will be used as opacity value. This rendering parameter can be overridden by the current rendered [[orxGRAPHIC|graphic object]].
-  * ''Body'': Config name of the [[orxBODY]] to use for this object. This gives physical properties ((collision detection/dynamics through the use of orx's internal physics plugin)) to the object. If none is provided, the object won't have any physical properties (ie. no collision detection).+  * ''Repeat'': Specifies if the object should be repeated (so as to achieve a tiling effect) when rendered. The vector specifies the number of times the object will be repeated on X and Y axes (Z being ignored). If none is provided, the value specified for the current [[orxGRAPHIC]] will be used. Please notice that the repeat property does not change the object's size, if you wish the object to be drawn several times (e. g.: you want to render the ground of your game, by having the same graphic several times) you need to set the ''Scale'' property as well. Other values must be strictly positive. This will be ignored for text objects. 
 +  * ''FXList'': Specifies a list of [[orxFX]] to apply on this object when createdFX will be played immediately. Up to 8 FXs can be defined. If none is provided, no [[orxFX]] will be applied. 
 +  * ''FXRecursiveList'': Should the corresponding FXs in FXList be applied recursively (defaults to false for each of them)
 +  * ''SoundList'': List of [[orxSOUND]] to apply on the object at its creation. They can be both music or sound. Up to 4 sounds can be defined. If none is provided, no sound will be created with this object. 
 +  * ''ShaderList'': List of [[orxSHADER]] to apply when this object will be rendered. Shader will be activated immediately. The shader is applied after the object's rendering but object without any ''Graphic'' can also use them Up to 4 shaders can be defined. If none is provided, no shader will be applied when the object is rendered.  
 +  * ''TrackList'': Timeline tracks will be played immediately. Up to 16 timeline tracks can be defined.
   * ''ChildList'': List of objects (config names) to create along this object. They'll be linked as children which means they'll adapt to the object's current position, rotation and scale (they'll 'follow' it). Children will automatically be deleted when the current object (ie. their parent) is deleted. Up to 255 children can be created. If no value is provided for this property, no children will be created.   * ''ChildList'': List of objects (config names) to create along this object. They'll be linked as children which means they'll adapt to the object's current position, rotation and scale (they'll 'follow' it). Children will automatically be deleted when the current object (ie. their parent) is deleted. Up to 255 children can be created. If no value is provided for this property, no children will be created.
   * ''ChildJointList'': Optional list of joints to use to link the children to the parent. If defined, its indices **must** match those of the ''ChildList'' property. Defaults to nothing.   * ''ChildJointList'': Optional list of joints to use to link the children to the parent. If defined, its indices **must** match those of the ''ChildList'' property. Defaults to nothing.
-  * ''Clock'': Associates the corresponding clock and creates it if needed. If no value is provided, no clock will be associated (updates will only depend of the main (aka core) clock). Associated clocks are useful to achieve time localized stretching (only for the corresponding object). When an object is time strectched by an associated clock, all its properties will behave accordingly (spawners, FXs, physics and sound pitch). 
-  * ''Color'': Defines a color (ie. teint) to apply on this object when rendered. This color will override any color defined in the current rendered [[orxGRAPHIC]] for this object. If none is provided, the color of the current [[orxGRAPHIC]] will be used is available, the white color (ie. no teint) will be used otherwise. 
-  * ''DepthScale'': Defines if the object should be //visually// (and not physically) scaled when rendered, depending on its relative depth (Z axis) to the camera. If you want to achieve a physically correct display of an object with differential scrolling, this property should be set to true //AND// ''AutoScroll'' set to ''both''. If not you might get visual gaps at rendering. Howevere, if you don't use [[orxBODY]] for this object, it doesn't matter. By default its value is ''false''. 
-  * ''Flip'': Defines if the object should be flipped when rendered ((it only affects the visual, physical property, ie. its body, won't be affected)). It can be flipped on either ''X'' axis or ''Y'' axis or on the ''both'' axes at the same time. If no value is provided, no flipping will occur. 
-  * ''FXList'': Specifies a list of [[orxFX]] to apply on this object when created. Up to 4 FXs can be defined. If none is provided, no [[orxFX]] will be applied. 
-  * ''Graphic'': Config name of the [[orxGRAPHIC]] associated to this object. When an object is animated, the current frame's graphic will be displayed instead. If none is provided, the object will exist but won't be visible (ie. nothing will be displayed for it by the renderer). 
-  * ''Group'': GroupId from the [[en:orx:config:settings_structure:orxcamera|GroupList]] for the object to be rendered into (like a layer).  
-  * ''LifeTime'': Specified the life time of this object in seconds. 0 means it'll be instantly deleted. It's default value is -1.0, which means the object has an infinite life time. 
   * ''ParentCamera'': Config name of the [[orxCAMERA]] that will be used as parent. This is very useful to place objects in the camera space for UI purposes, for example. If none is provided, the object won't have any parent except if it was created through a ''ChildList'' of another object.   * ''ParentCamera'': Config name of the [[orxCAMERA]] that will be used as parent. This is very useful to place objects in the camera space for UI purposes, for example. If none is provided, the object won't have any parent except if it was created through a ''ChildList'' of another object.
-  * ''Position'': Initial position for this object, in pixels. If an object has a parent, this value will be considered in parent's space instead than in world space. By default its value is (0.0, 0.0, 0.0). +  * ''UseParentSpace'': If set to true/both and has a parent at creation (camera, object or spawner((this won't affect objects created through another object's ''ChildList'')), its position and scale will be considered in parent's space, ie. values between 0.0 and 1.0 defines parent's size on each axis ((mainly used for easiness of placing UI objects relative to camera that will remain resolution independent)) and using its pivot as origin. It can be applied individually to only position or scale. Only one of the two parent property can be considered by using the value ''position'' or ''rotation''Defaults to true if ParentCamera is defined, false otherwise. 
-  * ''Repeat'': Specifies if the object should be repeated (so as to achieve a tiling effect) when rendered. The vector specifies the number of times the object will be repeated on X and Y axes (Z being ignored). If none is provided, the value specified for the current [[orxGRAPHIC]] will be used. Please notice that the repeat property does not change the object's size, if you wish the object to be drawn several times (e. g.: you want to render the ground of your game, by having the same graphic several times) you need to set the ''Scale'' property as well. +  * ''IgnoreFromParent'': Defines which parts of the parent's transformation will be ignored when transmitted to the object. Ignoring any position components will take precedence over placement pivot override (see 'Position') and might yield unexpected results. Defaults to none
-  * ''Rotation'': Initial 2D rotation for this object, in degrees. If an object has a parent, this value will be considered in parent's space instead than in world space. By default its value is 0.0. +  * ''OnPrepare'': Command run when preparing an object for creation. If the command returns false or empty, the object will not be created. 
-  * ''Speed'': Initial speed for this object, in pixels/second. Even objects without an [[orxBODY]] can use speed. By default its value is (0.00.0, 0.0). +  * ''OnCreate'': Command run when an object has been created. 
-  * ''Scale'': Initial scale for this object (Z component being ignored). By default its value is 1.0. (ie. (1.0, 1.0, 0.0) )) +  * ''OnDelete'': Command run when an object will get deleted. If the command returns false or empty, the object will not be deleted, but only deactivated.
-  * ''ShaderList'': List of [[orxSHADER]] to apply when this object will be rendered. The shader is applied after the object's rendering but object without any ''Graphic'' can also use them. Up to 4 shaders can be defined. If none is provided, no shader will be applied when the object is rendered. +
-  * ''SoundList'': List of [[orxSOUND]] to apply on the object at its creation. They can be both music or sound. Up to 4 sounds can be defined. If none is provided, no sound will be created with this object. +
-  * ''Spawner'': Config name of the [[orxSPAWNER]] that will be created and linked to this object. By default no spawner will be created. +
-  * ''Smoothing'': Specifies if the graphic object should be rendered with antialising or not. This property is overridden by the current [[orxGRAPHIC]] used for this object. By default its value is default which means the [[en:orx:config:settings_main:main#display_module|global display setting value]] will be used. +
-  * ''TrackList'': Timeline tracks will be played immediately. Up to 16 timeline tracks can be defined. [[tutorials:community:acksys:commandnotes|Command Module notes]] is one way to use TrackList. +
-  * ''UseParentSpace'': If set to ''true'' or ''both'' and the object has a valid parent [[orxCAMERA]] ((this won't affect objects created through another object's ''ChildList'')), its position and scale will be considered in parent's space, ie. values between 0.0 and 1.0 defines parent's size on each axis ((mainly used for easiness of placing UI objects relative to camera that will remain resolution independent)). Only one of the two parent property can be considered by using the value ''position'' or ''rotation''Its value is ''true'' by default+
-  * ''UseRelativeSpeed'': If set to ''true'', the value of the ''Speed'' property will be considered relatively to the current object's rotation and scaleBy default its value is ''false''.+
  
  
 ==== Latest config settings for the Development Version ==== ==== Latest config settings for the Development Version ====
 {{section>en:orx:config:developmentversion#&noheader&nofooter&noeditbutton}} {{section>en:orx:config:developmentversion#&noheader&nofooter&noeditbutton}}
en/orx/config/settings_structure/orxobject.1496119845.txt.gz · Last modified: 2017/05/30 00:50 (7 years ago) (external edit)