I reccomend either one of:
- Using the animation library.
- Script it all yourself, by having a task or a phase in which it checks if the boss is moving, standing still or attacking while increasing a frame value. If you have a sprite sheet with evenly placed graphics it also becomes easier to define the graphic rects, which I would do something like this:
//somewhere at the start:
let animframe=-1;
let leftrect = 0;
let rightrect = 0;
//In the animation task or whatever.
animframe++;
ascent(anim in 0.."amount of sprites in the animation"){
if(animframe==(anim*5)){
leftrect = anim*"width of sprites";
rightrect = "width of sprites" + anim*"width of sprites";
}
}
if(animframe==("amount of sprites in the animation"*5+5)){animframe=-1;}
SetGraphicRect(leftrect, "top rect", rightrect, "bottom rect");
I'm not sure if this works correctly, but this is mainly how I did boss animations in Ph3. (So I tried to adapt it to 0.12m type scripting.)
The text using quotation marks are just placeholders.