I have not been able to find an example of vehicle animation in nml so I cannot compare and figure where the problem is.
stripped down code of the animation code in eGRVTS2:
Code: Select all
/* 2HORSE Animation Switches */
switch (FEAT_ROADVEHS, PARENT, switch_2HORSE_v1_animation, motion_counter) {
1: spriteset_2HORSE_v1_a1;
2: spriteset_2HORSE_v1_a1;
3: spriteset_2HORSE_v1_a2;
4: spriteset_2HORSE_v1_a2;
7: spriteset_2HORSE_v1_a1;
8: spriteset_2HORSE_v1_a1;
9: spriteset_2HORSE_v1_a2;
10: spriteset_2HORSE_v1_a2;
13: spriteset_2HORSE_v1_a1;
14: spriteset_2HORSE_v1_a1;
15: spriteset_2HORSE_v1_a2;
spriteset_2HORSE_v1_a3;
}
switch (FEAT_ROADVEHS, PARENT, switch_2HORSE_v2_animation, motion_counter) {
[...]
}
switch (FEAT_ROADVEHS, PARENT, switch_2HORSE_v3_animation, motion_counter) {
[...]
}
switch (FEAT_ROADVEHS, PARENT, switch_2HORSE_v4_animation, motion_counter) {
[...]
}
/* HORSE SPRITES RANDOMIZERS */
random_switch (FEAT_ROADVEHS, SELF, random_switch_spriteset_2HORSE) {
dependent: random_switch_spriteset_1HORSE;
1: return switch_2HORSE_v1_animation;
1: return switch_2HORSE_v2_animation;
1: return switch_2HORSE_v3_animation;
1: return switch_2HORSE_v4_animation; //1+1+1+1 = 4 = 2^2
}
/* START: item_2HORSE_TEAM */
item(FEAT_ROADVEHS, item_2HORSE_TEAM, 11) {
property {
[...]
}
graphics
{
colour_mapping: switch_recolour_function;
default: random_switch_spriteset_2HORSE;
}