I am trying to animate a gunner switch for a tank where a light illuminates for either main gun or coax on the gunner's dashboard. The assumption was that this should work:
in config.cpp class AnimationSources:
class mainGunSelected { source = "isSelected"; weapon = "CUP_Vcannon_M256_M1Abrams"; };
in model.cfg
class mainGunSelected { type = "hide"; source = "mainGunSelected"; selection = "gun_select_main"; minValue = 0; maxValue = 1; hideValue = 0; unhideValue = 0.5; };
However, this doesn't work, isSelected is always 0 for vehicle weapons. Replacing isSelected with e.g. reload confirms that the anim is working,