-1: Vehicle Refit, I have 3 different liveries which can be chosen to be used on the locomotive.
-2: If the Locomotive has been flipped (facing forward or backward within the consist), Each livery has 2 spritesets, one for if the locomotive is not flipped, and one for if it is flipped.
what I currently have is this
Code: Select all
//cargo subtype text for GP38-2 refits
switch(FEAT_TRAINS, SELF, switch_GP38_2_cargo_subtype_text, cargo_subtype) {
0: return string(STR_CP_BASIC_RED);
1: return string(STR_CP_RED_WITH_BEAVER);
2: return string(STR_CP_RAIL_SYSTEMS_FLAG);
return CB_RESULT_NO_TEXT;
}
//choose livery
switch(FEAT_TRAINS, SELF, switch_GP38_2_livery, cargo_subtype) {
0: switch_GP38_2_CP_Red_facing;
1: switch_GP38_2_CP_Beaver_facing;
2: switch_GP38_2_CP_Flag_facing;
}
//CP Red GP38-2
switch(FEAT_TRAINS, SELF, switch_GP38_2_CP_Red_facing, vehicle_is_flipped) {
0: spriteset_GP38_2_CP_Red_engine_forward;
spriteset_GP38_2_CP_Red_engine_reverse;
}
//CP Golden Beaver GP38-2
switch(FEAT_TRAINS, SELF, switch_GP38_2_CP_Beaver_facing, vehicle_is_flipped) {
0: spriteset_GP38_2_CP_Beaver_engine_forward;
spriteset_GP38_2_CP_Beaver_engine_reverse;
}
//CP Dual Flag GP38-2
switch(FEAT_TRAINS, SELF, switch_GP38_2_CP_Flag_facing, vehicle_is_flipped) {
0: spriteset_GP38_2_CP_Flag_engine_forward;
spriteset_GP38_2_CP_Flag_engine_reverse;
}
My problem is that I'm getting an error that the "vehicle_is_flipped" switch blocks seem to not exist, the compiler will get to the choose livery switch, but will then give me a "Unrecognized identifier 'switch_GP38_2_CP_Red_facing' encountered" error for option 0 of the choose livery switch block
I can't seem to find anything in the documentation about this, nor can I find any articles in the forum that cover this issue. Any help will be appreciated.