User Tools

Site Tools


en:guides:beginners:timeline_tracks

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:guides:beginners:timeline_tracks [2018/02/13 20:47 (7 years ago)] – ↷ Page moved from guides:beginners:timeline_tracks to en:guides:beginners:timeline_tracks iarwainen:guides:beginners:timeline_tracks [2024/12/13 03:50 (4 months ago)] (current) sausage
Line 7: Line 7:
 Before we do this, remove the single monster from the Scene. We don't need it any more: Before we do this, remove the single monster from the Scene. We don't need it any more:
  
-<code=ini>+<code=ini [highlight_lines_extra="5"]>
 [Scene] [Scene]
 ChildList = PlatformObject # MiddlePlatformObject # ChildList = PlatformObject # MiddlePlatformObject #
Line 23: Line 23:
 </code> </code>
  
-This will create monsters over and over every second for us. But the monster objects need to start at a random position each time. Change the monster object to have a range of starting x positions:+Attach the track to the Scene object so that Monster objects are created over and over:
  
-<code=ini+<code=ini [highlight_lines_extra="6"]>
-[MonsterObject] +
-Graphic      = MonsterGraphic +
-AnimationSet = MonsterAnimationSet +
-Position     = (20, 0, 0) ~ (600, 0, 0) +
-Scale        = 2.0 +
-Body         = MonsterBody +
-</code> +
- +
-Finally, to actually use the track which will create monsters, add it to the TrackList property in the Scene section: +
- +
-<code=ini>+
 [Scene] [Scene]
 ChildList = PlatformObject # MiddlePlatformObject # ChildList = PlatformObject # MiddlePlatformObject #
Line 44: Line 33:
 TrackList = MonsterMakerTrack TrackList = MonsterMakerTrack
 </code> </code>
 +
 +So that the monster objects start at a random position each time. Change the monster object to have a range of starting x positions:
 +
 +<code=ini [highlight_lines_extra="4"]>
 +[MonsterObject]
 +Graphic      = MonsterGraphic
 +AnimationSet = MonsterAnimationSet
 +Position     = (-380, -300, 0) ~ (200, -200, 0)
 +Scale        = 2.0
 +Body         = MonsterBody
 +</code>
 +
  
 Looking great! Monsters should be dropping in all over the place: Looking great! Monsters should be dropping in all over the place:
Line 51: Line 52:
 Some tweaks can be added to the monster and the body to improve things a little: Some tweaks can be added to the monster and the body to improve things a little:
  
-<code=ini>+<code=ini [highlight_lines_extra="5,12,13,20,21,22"]>
 [MonsterObject] [MonsterObject]
 Graphic      = MonsterGraphic Graphic      = MonsterGraphic
 AnimationSet = MonsterAnimationSet AnimationSet = MonsterAnimationSet
-Position     = (200, 0) ~ (6000, 0)+Position     = (-380-300, 0) ~ (200-200, 0)
 Speed        = (-20, 0, 0) ~ (20, 0, 0) Speed        = (-20, 0, 0) ~ (20, 0, 0)
 Scale        = 2.0 Scale        = 2.0
Line 82: Line 83:
 Finally, a touch of ''Restitution'' on the body will allow it to bounce just a touch when landing from a height. Finally, a touch of ''Restitution'' on the body will allow it to bounce just a touch when landing from a height.
  
-That should work a little better.+That should work a little better. Additionally, if you prefer the Jelly Monsters not too rotate when tipping over the edges of the platforms you can add a ''FixedRotation'' to the body: 
 + 
 +<code=ini [highlight_lines_extra="6"]> 
 +[MonsterBody] 
 +Dynamic            = true 
 +PartList           = MonsterBodyPart 
 +AngularDamping     = 50 
 +LinearDamping      = 0.2 
 +FixedRotation      = true 
 +</code> 
  
 ---- ----
  
-Next: [[guides:beginners:exploding_monsters|Part 18 – Exploding Monsters]].+Next: [[en:guides:beginners:exploding_monsters|Part 18 – Exploding Monsters]].
  
-{{section>guides:beginners:toc&noheader&nofooter&noeditbutton}}+{{section>en:guides:beginners:toc&noheader&nofooter&noeditbutton}}
en/guides/beginners/timeline_tracks.1518583674.txt.gz · Last modified: 2018/02/14 00:47 (7 years ago) (external edit)