User Tools

Site Tools


en:orx:config:settings_structure:orxspawner

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
en:orx:config:settings_structure:orxspawner [2020/08/31 05:37 (4 years ago)] – ↷ Links adapted because of a move operation sausageen:orx:config:settings_structure:orxspawner [2023/09/20 00:17 (6 months ago)] (current) sausage
Line 24: Line 24:
 UseSelfAsParent  = <bool> UseSelfAsParent  = <bool>
 IgnoreFromParent = none|all|rotation|scale|position|position.rotation|position.scale|position.position IgnoreFromParent = none|all|rotation|scale|position|position.rotation|position.scale|position.position
 +OnSpawn          = <command>
 </code> </code>
  
Line 30: Line 31:
  
 Here's a list of the available properties for an ''orxSPAWNER'' structure: Here's a list of the available properties for an ''orxSPAWNER'' structure:
-  * ''Object'': Defines the name of the object (ie. its config section name) that will be spawned. +  * ''Object'': Defines the name of the object (ie. its config section name) that will be spawned. This can be a randomized value
-  * ''WaveSize'': Defines the size of a wave (ie. number of objects spawned in a single wave)Its default value is 0 which means the automated wave spawning system isn't usedThe wave system only works for spawners that have been created and therefore owned by an [[orxOBJECT]]+  * ''WaveSize'': Number of object to spawn in every wave. 0 or no value means no automated wave spawning. This can be a randomized value
-  * ''WaveDelay'': Time ellapsed (in seconds) between two waves. Its default value is 0, which means there are no delay between two waves (ie. continuous spawning). If a negative value is provided, the wave system is deactivated.  The wave system only works for spawners that have been created and therefore owned by an [[orxOBJECT]]. +  * ''WaveDelay'': Time elapsed (in seconds) between two waves. Its default value is 0, which means there are no delay between two waves (ie. continuous spawning). If a negative value is provided, the wave system is deactivated.  The wave system only works for spawners that have been created and therefore owned by an [[orxOBJECT]]. 
-  * ''ActiveObject'': Number of allowed active object at the same time. When this limit is reached the spawner can't spawn objects anymore till some of the spawned objects are deleted. By default, its value is 0 which means there's no limit+  * ''ActiveObject'': Number of allowed active object at the same time. When this limit is reached the spawner can't spawn objects anymore till some of the spawned objects are deleted. 0 or no value means unlimited active objects
-  * ''TotalObject'': Number of total objects the spawner is allowed to create. When this limit is reached the spawner will deactivate itself and send an event ((Type = orxEVENT_TYPE_SPAWNER, ID = orxSPAWNER_EVENT_EMPTY)). By default, its value is 0 which means there's no limit.+  * ''TotalObject'': Number of total objects the spawner is allowed to create. When this limit is reached the spawner will deactivate itself and send an event ((Type = orxEVENT_TYPE_SPAWNER, ID = orxSPAWNER_EVENT_EMPTY)). 0 or no value means unlimited total objects.
   * ''AutoReset'': If this is set to ''true'', when the spawner reaches its total limit, it'll be reset instead of deactivated. An event ((Type = orxEVENT_TYPE_SPAWNER, ID = orxSPAWNER_EVENT_RESET)) will be sent to notify the user. After being reset, the spawner will continue spawning as if it was brand new with the current active and total object counters back to 0. By default this property is set to ''false''.   * ''AutoReset'': If this is set to ''true'', when the spawner reaches its total limit, it'll be reset instead of deactivated. An event ((Type = orxEVENT_TYPE_SPAWNER, ID = orxSPAWNER_EVENT_RESET)) will be sent to notify the user. After being reset, the spawner will continue spawning as if it was brand new with the current active and total object counters back to 0. By default this property is set to ''false''.
   * ''CleanOnDelete'': If this is set to ''true'' all the spawned objects still leaving will be deleted as soon as the spawner gets deleted. Defaults to ''false''.   * ''CleanOnDelete'': If this is set to ''true'' all the spawned objects still leaving will be deleted as soon as the spawner gets deleted. Defaults to ''false''.
   * ''ObjectSpeed'': If this property is defined, it'll give an initial speed to every spawned object that will override any speed setting of the object itself. By default, there's no speed override.   * ''ObjectSpeed'': If this property is defined, it'll give an initial speed to every spawned object that will override any speed setting of the object itself. By default, there's no speed override.
   * ''Position'': Position of the spawner in its parent space, in pixels. Defaults to (0, 0, 0).   * ''Position'': Position of the spawner in its parent space, in pixels. Defaults to (0, 0, 0).
-  * ''Rotation'': Rotation of the spawner in its parent spacein degrees. Defaults to 0°. +  * ''Rotation'': Rotation of the spawner in its parent space. Angle in degrees around z axis. Defaults to 0°. 
-  * ''Scale'': Scale of the spawner in its parent space (Z component being ignored). By default its value is 1.0. ((ie. (1.0, 1.0, 0.0) ))+  * ''Scale'': Scale of the spawner in its parent space (z is ignored for 2D objects). By default its value is 1.0. ((ie. (1.0, 1.0, 0.0) ))
   * ''Interpolate'': When interpolate is set to true, sub-frame precision spawning will be emulated if needed. Defaults to false.   * ''Interpolate'': When interpolate is set to true, sub-frame precision spawning will be emulated if needed. Defaults to false.
   * ''Immediate'': If set, the delay will be ignored for the first wave after creation or reset; Defaults to false.   * ''Immediate'': If set, the delay will be ignored for the first wave after creation or reset; Defaults to false.
Line 50: Line 51:
   * ''UseSelfAsParent'': If set to ''true'', all spawned object will have the spawner as parent (in the [[en:tutorials:objects:frame|orxFRAME hierarchy]] sense). This means that every spawned object will move together with its spawner parent: it will adapt to its position, rotation and scale. If you only want a spawned object to adopt the current orientation of the Spawner, see ObjectSpeed and UseRotation. By default this property's value is set to ''false''.   * ''UseSelfAsParent'': If set to ''true'', all spawned object will have the spawner as parent (in the [[en:tutorials:objects:frame|orxFRAME hierarchy]] sense). This means that every spawned object will move together with its spawner parent: it will adapt to its position, rotation and scale. If you only want a spawned object to adopt the current orientation of the Spawner, see ObjectSpeed and UseRotation. By default this property's value is set to ''false''.
   * ''IgnoreFromParent'': none|all|[[en:examples:objects:non_rotating_children|rotation]]|scale|position|position.rotation|position.scale|position.position; NB: Defines which parts of the parent's transformation will be ignored when transmitted to the spawner. Defaults to none.   * ''IgnoreFromParent'': none|all|[[en:examples:objects:non_rotating_children|rotation]]|scale|position|position.rotation|position.scale|position.position; NB: Defines which parts of the parent's transformation will be ignored when transmitted to the spawner. Defaults to none.
 +  * ''OnSpawn'': Command to run on an object after it has been spawned. Defaults to none.
  
 ==== 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/orxspawner.txt · Last modified: 2023/09/20 00:17 (6 months ago) by sausage