SCI1.1 Animation Cycling Options
In order to give you a breakdown of the different cycling classes available, we are going to need an instance of a Prop or Actor available to run them against. So before we get into any details, lets go ahead and create an instance of a Prop. I am going to use the ego view 000 as I know it is one that everyone has available from the start. Also, with the cycle classes, you can also set the cycleSpeed to slow down how fast the animation cycles. If it is not set, the Prop will cycle as fast as the game will let it. It would be more accurate to say cycle delay than cycle speed because the larger the number the slower the Prop cycles.
(instance testCycler of Prop
(properties
view 0
loop 0
cel 0
x 160
y 100
)
)
So now that we have something to apply these cycling classes to, let's go ahead and get started.
Beg
This class simply cycles the view from whatever cel it is currently on to the first cel in the loop. When the loop reaches the first cel, it stops. This class is built into the cycle script so you won't need to do anything special in order to see it in action. So let's go ahead and init our testCycler instance including a call to this class.
(testCycler:
init()
cel(5)
setCycle(Beg)
cycleSpeed(5)
)
Beg is also one of the special cycling classes that has the ability to cue an event when it has completed it's cycle. It makes very useful when used in conjunction with a change state in order to progress a cut scene or animation sequence.
CT
Presumably an abbreviation for cycle to, this cycle class allows you to specify a target cel and cycle direction that it will cycle to from it's current cel. As a side note, Sierra seems to have absolutely loved the CT cycle class. Every time I turn around I see it in their scripts.
(testCycler:
init()
setCycle(CT 4 cdFORWARD)
cycleSpeed(10)
)
In this case, if you're view is currently on cel 5, then the view will cycle to the last cel, then restart at cel 0 and continue on the cel 4 where it will then stop. The same can be said when the cycle direction is set to reverse and the current cel number is smaller than the target cel, it will cycle to the first cel, then go to the last cel and continue backwards till it reaches the cel specified.
(testCycler:
init()
cel(3)
setCycle(CT 4 cdBACKWARD)
cycleSpeed(10)
)
CT is also one of the special cycling classes that has the ability to cue an event when it has completed it's cycle. It makes very useful when used in conjunction with a change state in order to progress a cut scene or animation sequence.
End
This class simply cycles the view from whatever cel it is currently on to the last cel in the loop. When the loop reaches the last cel, it stops. This class is built into the cycle script so you won't need to do anything special in order to see it in action. So let's go ahead and init our testCycler instance including a call to this class.
(testCycler:
init()
setCycle(End)
cycleSpeed(5)
)
End is also one of the special cycling classes that has the ability to cue an event when it has completed it's cycle. It makes very useful when used in conjunction with a change state in order to progress a cut scene or animation sequence.
Fwd
This class simply cycles the view continuously forward. When the loop reaches the last cel, it starts over from cel 0 and continues on indefinitely. This class is built into the cycle script so you won't need to do anything special in order to see it in action. So let's go ahead and init our testCycler instance including a call to this class.
(testCycler:
init()
setCycle(Fwd)
cycleSpeed(5)
)
Osc
This class simply cycles the view forward and when it has reached the last cel, then cycles the view in reverse. When the loop reaches the first cel again, it then starts over cycling the view forwar and continues on in this way indefinitely. This class is built into it's own script so you will need to add the line to use the script in order to see it in action. So let's go ahead and init our testCycler instance including a call to this class.
In the section with all of the other use statements.
(use "Osc")
Now we are ready to init our test prop with this class.
(testCycler:
init()
setCycle(Osc)
cycleSpeed(5)
)