Page MenuHomeFeedback Tracker

isSelected as an anim source for vehicle weapons
New, NormalPublic

Description

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,

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Anims
Steps To Reproduce

See above. It would be expected that isSelected goes from 0 to 1 if the weapon (the Abrams' main cannon in this case) is the selected weapon, however, it stays zero.

Event Timeline

h- added a subscriber: h-.Apr 19 2021, 2:15 PM