User Tools

Site Tools


en:tutorials:objects:lifetime

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:tutorials:lifetime [2019/05/29 17:23 (5 years ago)] sausageen:tutorials:objects:lifetime [2020/08/31 18:18 (4 years ago)] (current) – ↷ Links adapted because of a move operation 66.249.64.26
Line 5: Line 5:
 But you can also specify one or more literals to create lifetime situations that are a little richer. But you can also specify one or more literals to create lifetime situations that are a little richer.
  
-Before getting into that, let's [[en:tutorials:creating_your_own_project|create a blank project using the init script]].+Before getting into that, let's [[en:tutorials:projects:creating_your_own_project|create a blank project using the init script]].
  
 ===== Numeric Lifetime ===== ===== Numeric Lifetime =====
Line 73: Line 73:
  
 Run that and as soon as the appearance sound is finished, the object's life is over. Run that and as soon as the appearance sound is finished, the object's life is over.
 +
 +
 +===== Anim Lifetime =====
 +
 +For an object, using the ''anim'' literal means that when all animations have finished playing on your object, then the object will be destroyed.
 +
 +<code ini>
 +[Object]
 +Graphic         = @
 +Texture         = logo.png
 +SoundList       = @
 +Sound           = appear.ogg
 +Pivot           = center
 +AngularVelocity = 18
 +FXList          = FadeIn # ColorCycle
 +LifeTime        = anim
 +</code>
 +
 +Check out the [[en:tutorials:main#animation|animation tutorials]] to learn about the animation system and give the ''anim'' literal a try. 
  
 ===== Child Lifetime ===== ===== Child Lifetime =====
Line 150: Line 169:
 ==== Conclusion ==== ==== Conclusion ====
  
-There's a lot of combinations and scenarios that be covered with multiple lifetimes. I can see sound, fx and track being extremely useful. You can get more info on usage at: [[en:orx:config:settings_structure:orxobject|orxOBJECT structure]] +There's a lot of combinations and scenarios that be covered with multiple lifetimes. I can see sound, fx and track being extremely useful.
  
 +===== See also =====
 +  - [[en:examples:objects:kill_parent_object_when_children_die|Having a Parent Object die after all children have died]]
 +  - [[en:orx:config:settings_structure:orxobject|orxOBJECT structure]] 
en/tutorials/objects/lifetime.1559175806.txt.gz · Last modified: 2019/05/29 20:23 (5 years ago) (external edit)