Game Development Reference
In-Depth Information
How Not to Autoplay Animations
Have you noticed that the animations so far are playing automatically when you launch
the game? Sooner or later there will be a time where you don't want that. Like, for in-
stance, right now.
Assuming you'd like to play back an animation at an appropriate time while the game is
running, that's something you need to set up and code. To create an initially inactive saw,
you should create a duplicate of
Saw1.ccb
. If it is available, you should prefer to use
SpriteBuilder's Duplicate command; otherwise, make the copy using Finder as described
earlier. Rename the duplicate to
Saw1_noautoplay.ccb
, and open it in SpriteBuilder.
Editing Timelines to Uncheck Autoplay
First, you will want to prevent the animation from starting right away. Click on the
Timeline List—that's the bar just below the Timeline Controls that currently reads “
De-
fault Timeline
.” See
Figure 5-1
for reference. If the context menu won't show up or
doesn't look like the one shown in
Figure 5-8
, I'm pretty sure you're trying to right-click
it. Use the left mouse button instead, just like with the Timeline Chain.
Figure 5-8
.
Clicking the Timeline List brings up the Timelines context menu, from where you can select, cre-
ate, duplicate, and edit Timelines
From the Timelines context menu, choose
Edit Timelines
. This will bring up a dia-
log like in
Figure 5-9
but with just the Default Timeline entry.
Search WWH ::
Custom Search