[Solved] Stage coding problem

Started by Insigniawarfare, February 05, 2012, 07:15:43 AM

Previous topic - Next topic

Insigniawarfare

How do you change the timing of when you want the animation to start.
I have buildings shaking up and down like its about to collapse in my stage but i want to change the timing of when i want the building to start shaking is their a way to do that.

Cobra Caddie

There are a few ways to do it. But the easiest way is to give the first frame of animation(before the buildings start to shake) a long animation time. Like say if you wanted it to wait 10 seconds:

1, 0, 0, 0, 600

Then, just type "loopstart" after that if you wanna have a looped animation:

1, 0, 0, 0, 600
loopstart
1, 1, 0, 0, 10
1, 2, 0, 0, 10
1, 3, 0, 0, 10
1, 4, 0, 0, 10

In the example I gave, the animation will play the first frame for 10 seconds, then play the animation below it for the rest of the match.

mh777

BGControllers are your friend in this case. Cybaster's tutorial has enough to get you started.   Basically, it involves setting up a CtrlID for the element/object that you want to control, and linking it to a CtrlDef.

The CtrlDef part will look something like this, for example's sake:


[BG object]
type = normal
spriteno = 0,0
id = number

[BGCtrlDef whatever]
CtrlID = whatever number you assigned for the object

[BGCtrl shake]
time = the number of ticks you want to start the shaking
type = enable


edit: Caddie's way works, too, and it's not as complicated. :)

Insigniawarfare

#3
Thank you both and yes i was trying to do bg ctrl