~Hakurei Shrine~ > Rika and Nitori's Garage Experiments

Boss Movement script.

Pages: << < (2/2)

Halca:

One thing I'd like to change.
I noticed that when the she moves she doesn't turn to the right or left.
How can I make this so?
Is it even do-able?

JormundElver:

For Rumia, this sample script properly animates her movements http://touhou.wikia.com/wiki/Touhou_Danmakufu:_Sample_03 .

Point of interest within that I believe is

    // set the graphic region
    sub setGraphicStop  { SetGraphicRect(  0,   0,  64,  64); }    // stopping
    sub setGraphicPose  { SetGraphicRect( 64,   0, 128,  64); }    // special pose
    sub setGraphicLeft  { SetGraphicRect(128,   0, 192,  64); }    // move left
    sub setGraphicRight { SetGraphicRect(192,   0, 256,  64); }    // move right

    // set the graphic region according to the moving direction
    sub setGraphicMove {
        if(GetSpeedX < 0) {
            setGraphicLeft;
        } else {
            setGraphicRight;
        }
    }

Edit to mention that you'll obviously need more then the above chunk to animate her, but I think that's where they define the graphic boxes of her images, that are called upon when she moves.


Pages: << < (2/2)

Go to full version