I not that familiar with arrays so someone probably has to explain me how I should do this. Just a basic array that goes through different values (like shot types) are not that hard, but I have no idea how to do it with object shots.
EDIT: I got a new problem now (the above one is still unsolved, but forget that for now). The @DrawLoop isn't working reliably. This means that the animation to a specific direction works sometimes, and sometimes it doesn't. It always loads the first sprite of the animation, but doesn't always "play" it. Also, when the boss stops, it rarely goes to the "idle" animation. I'm not really sure why this happens.
@DrawLoop {
SetTexture(Boss);
SetRenderState(ALPHA);
SetAlpha(255);
SetGraphicScale(2, 2);
SetGraphicAngle(0, 0, 0);
if(int(GetSpeedX())==0 && int(GetSpeedY())==0) {
if(frame<40){ SetGraphicRect(0, 0, 31, 31); }
if(frame>=40){ SetGraphicRect(32, 0, 64, 31); }
frame+=4;
frame2 = 0;
}
if(GetAngle()>=315 && GetAngle()<=360) {
if(frame2<20){ SetGraphicRect(0, 96, 31, 128); }
if(frame2>20 && frame2<40){ SetGraphicRect(32, 96, 63, 128); }
if(frame2>40 && frame2<60){ SetGraphicRect(64, 96, 95, 128); }
if(frame2>60){ SetGraphicRect(32, 96, 63, 128); }
frame = 0;
frame2+=4;
}
if(GetAngle()>=0 && GetAngle()<=45) {
if(frame2<20){ SetGraphicRect(0, 96, 31, 128); }
if(frame2>20 && frame2<40){ SetGraphicRect(32, 96, 63, 128); }
if(frame2>40 && frame2<60){ SetGraphicRect(64, 96, 95, 128); }
if(frame2>60){ SetGraphicRect(32, 96, 63, 128); }
frame = 0;
frame2+=4;
}
if(GetAngle()>=135 && GetAngle()<=225) {
if(frame2<20){ SetGraphicRect(0, 64, 31, 96); }
if(frame2>20 && frame2<40){ SetGraphicRect(32, 64, 63, 96); }
if(frame2>40 && frame2<60){ SetGraphicRect(64, 64, 95, 96); }
if(frame2>60){ SetGraphicRect(32, 64, 63, 96); }
frame = 0;
frame2+=4;
}
if(GetAngle()>225 && GetAngle()<315) {
if(frame2<20){ SetGraphicRect(64, 32, 95, 63); }
if(frame2>20 && frame2<40){ SetGraphicRect(32, 32, 63, 63); }
if(frame2>40 && frame2<60){ SetGraphicRect(0, 32, 31, 63); }
if(frame2>60){ SetGraphicRect(32, 32, 63, 63); }
frame = 0;
frame2+=4;
}
if(GetAngle()>45 && GetAngle()<135) {
if(frame2<20){ SetGraphicRect(0, 32, 31, 63); }
if(frame2>20 && frame2<40){ SetGraphicRect(32, 32, 63, 63); }
if(frame2>40 && frame2<60){ SetGraphicRect(64, 32, 95, 63); }
if(frame2>60){ SetGraphicRect(32, 32, 63, 63); }
frame = 0;
frame2+=4;
}
if(frame == 80) {
frame = 0;
}
if(frame2 == 80) {
frame2 = 0;
}
DrawGraphic(GetX, GetY);
}
EDIT 2: I also need to make a custom shot sheet. Doing that is not the problem itself. What I can't figure out is that how do you actually fire the custom shot. There is literally no information about this anywhere...