I'm trying to figure out how to get an animation working on a vehicle using NML. I have 4 spritesets - 1 for each of the animation frames. As I understand it, I should use the motion_counter variable. Assuming I call this in a switch, what would that look like? Here's what I have right now (which is obviously incorrect).
Code: Select all
switch (FEAT_AIRCRAFT, SELF, sw_v22_hor_anim, (motion_counter / 256)) {
1: ss_ac_v22_hor_1;
2: ss_ac_v22_hor_2;
3: ss_ac_v22_hor_3;
4: ss_ac_v22_hor_4;
5: ss_ac_v22_hor_1;
6: ss_ac_v22_hor_2;
7: ss_ac_v22_hor_3;
8: ss_ac_v22_hor_4;
9: ss_ac_v22_hor_1;
10: ss_ac_v22_hor_2;
11: ss_ac_v22_hor_3;
12: ss_ac_v22_hor_4;
13: ss_ac_v22_hor_1;
14: ss_ac_v22_hor_2;
15: ss_ac_v22_hor_3;
16: ss_ac_v22_hor_1;
ss_ac_v22_hor_1;
}