Jump to content
Sign in to follow this  
xeno426

Vehicle proxy and damaged tires issue

Recommended Posts

I am having two issues with a truck model that has a giant rocket on the back. I am using a proxy for the rocket on the back. The proxy name points to the proper files.

bugnazeat1.th.jpg

I'm pretty sure the proxy model itself is fine.

bugnazeat3.th.jpg

Unfortunately, the model always shows up without the missile ingame.

buginvisiblemissile.th.jpg

When the rocket fires, it shows up fine.

The other issue I have is that when the tires are destroyed, the model continues to float in the air as those the tires were still there. I've tried to copy the same setup that the ArmA2 BIS models use with the named selections; the wheel models in the res LODs are named "wheel_x_x_hide" and they each have a corresponding triangle model called "wheel_x_x_unhide". The wheel models in the shadowLOD, Fire Geometry and View Geometry are named "wheel_x_x_damper", while the model in Geometry is called "wheel_x_x_damper_land", as are the vertex points in the LandContact LOD. Finally, in the Memory LOD, there are "wheel_x_x_damper" points for each wheel.

bugnazeat2.th.jpg

However, when the wheel is destroyed, it always looks like this.

bugfloatingural2.th.jpg

If it helps any, here's the code for the skeleton I am using.

   	class IRAN_Nazeatbones
	{
	isDiscrete=1;
 		skeletonInherit = "";
 		skeletonBones[]=
	{
		"volant", "",
		"wheel_1_1_damper_land","",
		"wheel_1_1_damper","wheel_1_1_damper_land",
		"wheel_1_1_steering","wheel_1_1_damper",
		"wheel_1_1","wheel_1_1_steering",
		"wheel_1_1_unhide","wheel_1_1",
		"wheel_1_1_hide","wheel_1_1",
		"wheel_1_2_damper_land","",
		"wheel_1_2_damper","wheel_1_2_damper_land",
		"wheel_1_2_steering","wheel_1_2_damper",
		"wheel_1_2","wheel_1_2_steering",
		"wheel_1_2_unhide","wheel_1_2",
		"wheel_1_2_hide","wheel_1_2",
		"wheel_1_3_damper_land","",
		"wheel_1_3_damper","wheel_1_3_damper_land",
		"wheel_1_3_steering","wheel_1_3_damper",
		"wheel_1_3","wheel_1_3_steering",
		"wheel_1_3_unhide","wheel_1_3",
		"wheel_1_3_hide","wheel_1_3",
		"wheel_2_1_damper_land","",
		"wheel_2_1_damper","wheel_2_1_damper_land",
		"wheel_2_1_steering","wheel_2_1_damper",
		"wheel_2_1","wheel_2_1_steering",
		"wheel_2_1_unhide","wheel_2_1",
		"wheel_2_1_hide","wheel_2_1",
		"wheel_2_2_damper_land","",
		"wheel_2_2_damper","wheel_2_2_damper_land",
		"wheel_2_2_steering","wheel_2_2_damper",
		"wheel_2_2","wheel_2_2_steering",
		"wheel_2_2_unhide","wheel_2_2",
		"wheel_2_2_hide","wheel_2_2",
		"wheel_2_3_damper_land","",
		"wheel_2_3_damper","wheel_2_3_damper_land",
		"wheel_2_3_steering","wheel_2_3_damper",
		"wheel_2_3","wheel_2_3_steering",
		"wheel_2_3_unhide","wheel_2_3",
		"wheel_2_3_hide","wheel_2_3",
		"ukaz_rychlo", "",
		"ukaz_rychlo2", "",
		"ukaz_rpm", "",
		"OtocVez", "",
		"OtocHlaven", "OtocVez",
		"fuel_01", "",
		"fuel_1", "",
		"prop_01", "",
		"prop_02", "",
		"prop_2", "",
		"prop_1", "",
		"damageHide", "",
		"glass1","damagehide",
		"glass2","damagehide",
		"glass3","damagehide",
		"glass4","damagehide",
		"damageVez", "OtocVez",
		"damageHlaven", "OtocHlaven"
	};
};

Can anyone offer insight into what I might be doing wrong?

Edited by Xeno426

Share this post


Link to post
Share on other sites

Might be the skeleton

Your wheels all working fine except for this?

Where BIS is using "volant" as the root, they dont use "wheelxxxxx"

Is your WHOLE model defined as "volant" ?

Are you trying to inherit the CfgModels or have you written your own?

Share this post


Link to post
Share on other sites

I'm pretty sure volant means steering wheel.

We (CWR2) don't have any wheel damper axes in our memoryLOD (except the Basic_Damper_Destruct_axis). Those are just stopaxx memory points to define the tyre tracks.

Do you have any custom source driven animations to retract the wheel upwards?

And do you have those animation sources defined in the config.cpp?

Edited by Max Power

Share this post


Link to post
Share on other sites
Gnat;2074106']Might be the skeleton

Your wheels all working fine except for this?

Where BIS is using "volant" as the root' date=' they dont use "wheelxxxxx"

Is your WHOLE model defined as "volant" ?[/quote']

Volant is just the steering wheel name. It just happens to be at the start of the skeleton list.

Gnat;2074106']Are you trying to inherit the CfgModels or have you written your own?

I'm using the one YorT already had' date=' with the changes to wheel bones.

We (CWR2) don't have any wheel damper axes in our memoryLOD (except the Basic_Damper_Destruct_axis). Those are just stopaxx memory points to define the tyre tracks.

Do you have any custom source driven animations to retract the wheel upwards?

I think so. Here's the model code.

	class IRAN_Nazeat6
{
	sectionsInherit="";
	sections[]=
	{
		"ammo",
		"camo1",
		"camo2",
		"sklo predni p",
		"sklo predni l",
		"zadni svetlo",
		"brzdove svetlo",
		"spz",
		"karoserie",
		"motor",
		"zbran",
		"telo",
		"zbytek",
		"levy predni",
		"levy prostredni",
		"levy zadni",
		"pravy predni",
		"pravy prostredni",
		"pravy zadni",
		"clan",
		"clan_sign",
		"zasleh",
		"P svetlo",
		"L svetlo",
		"glass1",
		"glass2",
		"glass3",
		"glass4",
		"palivo"
	};
	skeletonName="IRAN_Nazeatbones";
	class Animations
	{
		class damageHide
		{
			type="hide";
			source="damage";
			selection="damageHide";
		};
		class wheel_1_1_destruct : damageHide
		{
			hideValue=0.99;
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="HitLFWheel";
			sourceAddress="clamp";
			selection="wheel_1_1_hide";
		};
		class wheel_1_2_destruct : wheel_1_1_destruct
		{
			source="HitLBWheel";
			selection="wheel_1_2_hide";
		};
		class wheel_1_3_destruct : wheel_1_1_destruct
		{
			source="HitLMWheel";
			selection="wheel_1_3_hide";
		};
		class wheel_1_4_destruct : wheel_1_1_destruct
		{
			source="HitLF2Wheel";
			selection="wheel_1_4_hide";
		};
		class wheel_2_1_destruct : wheel_1_1_destruct
		{
			source="HitRFWheel";
			selection="wheel_2_1_hide";
		};
		class wheel_2_2_destruct : wheel_1_1_destruct
		{
			source="HitRBWheel";
			selection="wheel_2_2_hide";
		};
		class wheel_2_3_destruct : wheel_1_1_destruct
		{
			source="HitRMWheel";
			selection="wheel_2_3_hide";
		};
		class wheel_2_4_destruct : wheel_1_1_destruct
		{
			source="HitRF2Wheel";
			selection="wheel_2_4_hide";
		};
		class wheel_1_1_destruct_unhide : damageHide
		{
			hideValue=0.01;
			minValue=-1;
			maxValue=0;
			minPhase=-1;
			maxPhase=0;
			source="HitLFWheel";
			sourceAddress="mirror";
			selection="wheel_1_1_unhide";
		};
		class wheel_1_2_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitLBWheel";
			selection="wheel_1_2_unhide";
		};
		class wheel_1_3_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitLMWheel";
			selection="wheel_1_3_unhide";
		};
		class wheel_1_4_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitLF2Wheel";
			selection="wheel_1_4_unhide";
		};
		class wheel_2_1_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitRFWheel";
			selection="wheel_2_1_unhide";
		};
		class wheel_2_2_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitRBWheel";
			selection="wheel_2_2_unhide";
		};
		class wheel_2_3_destruct_unhide : wheel_1_1_destruct_unhide
		{
			source="HitRMWheel";
			selection="wheel_2_3_unhide";
		};
		class Glass1_destruct : damageHide
		{
			hideValue=0.99;
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="HitGlass1";
			sourceAddress="clamp";
			selection="glass1";
		};
		class Glass2_destruct : Glass1_destruct
		{
			source="HitGlass2";
			selection="glass2";
		};
		class Glass3_destruct : Glass1_destruct
		{
			source="HitGlass3";
			selection="glass3";
		};
		class Glass4_destruct : Glass1_destruct
		{
			source="HitGlass4";
			selection="glass4";
		};
		class Steering_1_1
		{
			type="rotationY";
			angle0=1.047198;
			angle1=-1.047198;
			axis="wheel_1_1_steering_axis";
			memory="true";
			minValue=-1.570796;
			maxValue=1.570796;
			minPhase=-1.570796;
			maxPhase=1.570796;
			source="drivingWheel";
			sourceAddress="clamp";
			selection="wheel_1_1_steering";
		};
		class Steering_2_1 : Steering_1_1
		{
			axis="wheel_2_1_steering_axis";
			selection="wheel_2_1_steering";
		};
		class Wheel_1_1
		{
			type="rotationX";
			angle0=0;
			angle1=-6.283185;
			axis="wheel_1_1_axis";
			memory="true";
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="wheel";
			sourceAddress="loop";
			selection="wheel_1_1";
		};
		class wheel_2_1 : Wheel_1_1
		{
			axis="wheel_2_1_axis";
			selection="wheel_2_1";
		};
		class wheel_1_2 : Wheel_1_1
		{
			axis="wheel_1_2_axis";
			selection="wheel_1_2";
		};
		class wheel_1_3 : Wheel_1_1
		{
			axis="wheel_1_3_axis";
			selection="wheel_1_3";
		};
		class Wheel_2_2 : Wheel_1_1
		{
			axis="wheel_2_2_axis";
			selection="wheel_2_2";
		};
		class Wheel_2_3 : Wheel_1_1
		{
			axis="wheel_2_3_axis";
			selection="wheel_2_3";
		};
		class Wheel_1_1_Damper
		{
			type="translationY";
			offset0=0;
			offset1=0;
			axis="";	//unknown :(
			memory="false";
			minValue=-1;
			maxValue=1;
			minPhase=-1;
			maxPhase=1;
			source="damper";
			sourceAddress="clamp";
			selection="wheel_1_1_damper_land";
		};
		class wheel_1_2_Damper : Wheel_1_1_Damper
		{
			selection="wheel_1_2_damper_land";
		};
		class wheel_2_1_Damper : wheel_1_1_Damper
		{
			selection="wheel_2_1_damper_land";
		};
		class wheel_1_3_Damper : wheel_1_1_Damper
		{
			selection="wheel_1_3_damper_land";
		};
		class Wheel_2_2_Damper : wheel_1_1_Damper
		{
			selection="wheel_2_2_damper_land";
		};
		class Wheel_2_3_Damper : wheel_1_1_Damper
		{
			selection="wheel_2_3_damper_land";
		};
		class wheel_1_1_Damage
		{
			type="translation";
			offset0=0;
			offset1=0.33;
			axis="osaveze";
			memory="true";
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="HitLFWheel";
			sourceAddress="clamp";
			selection="wheel_1_1_damper_land";
		};
		class wheel_1_2_Damage : wheel_1_1_Damage
		{
			source="HitLBWheel";
			selection="wheel_1_2_damper_land";
		};
		class wheel_1_3_Damage : wheel_1_1_Damage
		{
			source="HitLMWheel";
			selection="wheel_1_3_damper_land";
		};
		class wheel_2_1_Damage : wheel_1_1_Damage
		{
			source="HitRFWheel";
			selection="wheel_2_1_damper_land";
		};
		class wheel_2_2_Damage : wheel_1_1_Damage
		{
			source="HitRBWheel";
			selection="wheel_2_2_damper_land";
		};
		class wheel_2_3_Damage : wheel_1_1_Damage
		{
			source="HitRMWheel";
			selection="wheel_2_3_damper_land";
		};
		class wheel_1_1_Damper_Damage_BackAnim : wheel_1_1_Damage
		{
			offset1=-0.33;
			source="HitLFWheel";
			selection="wheel_1_1_damper";
		};
		class wheel_1_2_Damper_Damage_BackAnim : wheel_1_1_Damper_Damage_BackAnim
		{
			source="HitLBWheel";
			selection="wheel_1_2_damper";
		};
		class wheel_1_3_Damper_Damage_BackAnim : wheel_1_1_Damper_Damage_BackAnim
		{
			source="HitLMWheel";
			selection="wheel_1_3_damper";
		};
		class wheel_2_1_Damper_Damage_BackAnim : wheel_1_1_Damper_Damage_BackAnim
		{
			source="HitRFWheel";
			selection="wheel_2_1_damper";
		};
		class wheel_2_2_Damper_Damage_BackAnim : wheel_1_1_Damper_Damage_BackAnim
		{
			source="HitRBWheel";
			selection="wheel_2_2_damper";
		};
		class wheel_2_3_Damper_Damage_BackAnim : wheel_1_1_Damper_Damage_BackAnim
		{
			source="HitRMWheel";
			selection="wheel_2_3_damper";
		};
		class IndicatorSpeed
		{
			//animPeriod=0;
			type="rotation";
			source="speed";
			selection="ukaz_rychlo";
			axis="osa_rychlo";
			memory="false";
			minValue=0;
			maxValue=26;
			minPhase=0;
			maxPhase=26;
			//angle0=0.000000;
			//angle1="rad -240";
			angle0=-0.2617994;
			angle1=3.141593;
			sourceAddress="clamp";
		};
		class IndicatorSpeed2
		{
			type="rotation";
			source="speed";
			selection="ukaz_rychlo2";
			axis="osa_rychlo2";
			memory="false";
			animPeriod=0;
			minValue=0;
			maxValue=16.670000;
			angle0=0;
			angle1="rad -240";
		};
		class IndicatorRPM
		{
			//animPeriod=0;
			type="rotation";
			source="rpm";
			selection="ukaz_rpm";
			axis="osa_rpm";
			memory="false";
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			//angle0=0.000000;
			//angle1=2.967060;
			angle0=0;
			angle1=2.181662;
			sourceAddress="clamp";
		};
		class DrivingWheel
		{
			type="rotation";
			source="drivingWheel";
			selection="volant";
			begin="osaVolantZac";
			end="osaVolantKon";
			memory="false";
			animPeriod=0;
			minValue=-1;
			maxValue=1;
			angle0=-8;
			angle1=8;
		};
           class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="otocvez";
			axis="osaveze";
			animPeriod=0;
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};

		class MainGun: MainTurret
		{
			type="rotationX";
			source="mainGun";
			selection="otochlaven";
			axis="osahlavne";

		};
		class damageVez: damageHide
		{
			selection="damageVez";
		};
		class damageHlaven: damageHide
		{
			selection="damageHlaven";
		};
		class zpu4TruckIndicatorSpeed: IndicatorSpeed
		{
			maxValue=26;
			angle1="rad 180";
		};
		class zpu4TruckIndicatorRPM: IndicatorRPM
		{
			angle1=2.181662;
		};
		class fuel
		{
			type="rotation";
			source="fuel";
			selection="fuel_1";
			axis="fuel_1_axis";
			memory="false";
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			//angle0=-1.221730;
			//angle1=1.221730;
			angle0=1.22173;
			angle1=-2.75762;
			sourceAddress="clamp";
		};
		class prop_1
		{
			type="rotation";
			source="rpm";
			selection="prop_1";
			axis="prop_1_axis";
			memory="false";
			minValue=0.000000;
			maxValue=1.000000;
			angle0=-1.396263;
			angle1=-1.919862;
		};
		class prop_2
		{
			type="rotation";
			source="rpm";
			selection="prop_2";
			axis="prop_2_axis";
			memory="false";
			minValue=0.000000;
			maxValue=1.000000;
			angle0=-1.570796;
			angle1=-2.617994;
		};
	};
};

And do you have those animation sources defined in the config.cpp?

It's inheriting from IRAN_GRAD_Base, which I would assume already has those animations.

Share this post


Link to post
Share on other sites

		class wheel_1_1_Damage
		{
			type="translation";
			offset0=0;
			offset1=0.33;
			axis=[b][color="Red"]"osaveze"[/color][/b];
			memory="true";
			minValue=0;
			maxValue=1;
			minPhase=0;
			maxPhase=1;
			source="HitLFWheel";
			sourceAddress="clamp";
			selection="wheel_1_1_damper_land";
		};

Isn't osaVeze a turret axis?

Try this one:

 class wheel_1_1_Damage
     {
       type = "translation";
       source = "HitLFWheel";
       memory = 1;
       animPeriod = 0;
       selection = "wheel_1_1_damper_land";
       axis = "basic_damper_destruct_axis";
       minValue = 0.0;
       maxValue = 1.0;
       minPhase = 0.0;
       maxPhase = 1.0;
       offset0 = 0.0;
       offset1 = 0.2;
     };

Share this post


Link to post
Share on other sites

Thanks! That worked!

Can anyone help with the outstanding invisible proxy issue?

If it's any help, here are the config entries for the rocket.

CfgAmmo

	class IRAN_R_Nazeat6 : R_GRAD {
	scope = public;
	visibleFire = 12;	// how much is visible when this weapon is fired
	audibleFire = 2;
	visibleFireTime = 4;	// how long is it visible
	model = "\iran_vehicles\nazeatmissile.p3d";
	proxyShape = "\iran_vehicles\nazeat_proxy.p3d";
	hit = 1200;
	indirectHit = 240;
	indirectHitRange = 55;
	//thrustTime = 20;
	//thrust = 3000;
	maxSpeed = 900;	// max speed on level road, km/h
	timeToLive = 200;
	fuseDistance = 500;
	cost = 10000;
	//sideAirFriction = 0.9;
	//initTime = 0.0;
	whistleDist = 110;//2x indirect hit range
};

class IRAN_ARTY_R_356mm_HE_Rocket : ARTY_R_120mm_HE_Rocket {
	scope = public;
	cost = 1500;
	maxSpeed = 900;
	//thrust = 800;
	timeToLive = 4.5;
	fuseDistance = 10;
	ARTY_ReplaceWithAmmo = "IRAN_ARTY_R_356mm_HE";
   };

class IRAN_ARTY_R_356mm_HE : ARTY_R_120mm_HE {
	//airFriction = -0.000080;
	hit = 1200;
	indirectHit = 240;
	indirectHitRange = 55;
	cost = 1000;
	//timeToLive = 200;
	ARTY_NetShell = "IRAN_ARTY_Sh_356_NET";
	whistleDist = 110;//2x indirect hit range
};

CfgMagazine

class IRAN_1Rnd_Nazeat6 : 40Rnd_GRAD {
	scope = public;
	displayName = "$STR_IRAN_MN_NAZEAT6";
	artilleryLock = 1;
	count = 1;
	ammo = "IRAN_R_Nazeat6";
	sound[] = {"\iran_vehicle\Sounds\zelzal_launch", db30, 1};
};

class IRAN_ARTY_1Rnd_356mmHE_Nazeat : ARTY_40Rnd_120mmHE_BM21 {
	scope = public;
	displayName = "$STR_IRAN_MN_NAZEAT6";
	ammo = "IRAN_ARTY_R_356mm_HE_Rocket";
	count = 1;
	//nameSound = "rockets";
	sound[] = {"\iran_vehicle\Sounds\zelzal_launch", db30, 1};
};

CfgWeapons

 class IRAN_NazeatLauncher : GRAD {
	displayName = "Naze'at-6-H";
	magazines[] = {"IRAN_1Rnd_Nazeat6", "IRAN_ARTY_1Rnd_356mmHE_Nazeat"};
	//aiRateOfFire = 5.0;	// delay between shots at given distance
	//aiRateOfFireDistance = 8000;
	magazineReloadTime = 200;
	initSpeed = 450;
	modes[] = {"Single1", "Single2", "Single3", "Single4"};

	class Single1 : Single {
		displayName = "Semi (close)";
		sound[] = {"\iran_vehicle\Sounds\zelzal_launch", db30, 1};
		soundFly[] = {"\iran_vehicle\Sounds\zelzal_fly", db40, 0.8};
		minRange = 2670;
		minRangeProbab = 0.5;
		midRange = 2945;
		midRangeProbab = 0.7;
		maxRange = 3700;
		maxRangeProbab = 0.5;
		artilleryDispersion = 0.05;
		artilleryCharge = 0.44;
	};

	class Single2 : Single1 {
		displayName = "Semi (medium)";
		minRange = 3000;
		minRangeProbab = 0.43;
		midRange = 4211;
		midRangeProbab = 0.6;
		maxRange = 4700;
		maxRangeProbab = 0.3;
		artilleryDispersion = 0.15;
		artilleryCharge = 0.49;
	};

	class Single3 : Single2 {
		displayName = "Semi (far)";
		minRange = 6813;
		minRangeProbab = 0.37;
		midRange = 14517;
		midRangeProbab = 0.4;
		maxRange = 26847;
		maxRangeProbab = 0.2;
		artilleryDispersion = 0.25;
		artilleryCharge = 0.54;
	};

	class Single4 : Single3 {
		displayName = "Semi (distant)";
		minRange = 6813;
		minRangeProbab = 0.3;
		midRange = 14517;
		midRangeProbab = 0.4;
		maxRange = 26847;
		maxRangeProbab = 0.01;
		artilleryDispersion = 0.25;
		artilleryCharge = 0.59;
	};
    };

The AI ranges on the different shots still needs to be tweaked, but that's otherwise it.

Edited by Xeno426

Share this post


Link to post
Share on other sites

I think you need to add a cfgNonAIVehicles class to your vehicle config and list the proxy there.

class CfgNonAIVehicles
{
class ProxyWeapon;
class ProxyNazeat_Rocket: ProxyWeapon
{
  model = "pathto\somemodel";
};
};

Share this post


Link to post
Share on other sites

Yeah, I've already got that.

class CfgNonAIVehicles {
class ProxyWeapon;	// External class reference

class Proxynazeat_proxy : ProxyWeapon {
	model = "\IRAN_Vehicles\nazeat_proxy.p3d";
	simulation = "maverickweapon";
};
};

Share this post


Link to post
Share on other sites

I just use the siewinder proxy on my truck missiles and its fine

Looking at your ammo it may be an issue with your ammo base class. The grad does not use a proxy. Try using the r73 as your ammo inheritance

Share this post


Link to post
Share on other sites
Looking at your ammo it may be an issue with your ammo base class. The grad does not use a proxy. Try using the r73 as your ammo inheritance

Strange, that worked. But that doesn't make any sense; if I'm defining it in the ammo entry, why would it matter that it isn't defined in the parent class?

The problem is that now I have inherited values I don't want.

What should I do about about the ARTY_ ammo? There's no R-72 ARTY_ class to inherit from.

Share this post


Link to post
Share on other sites

ah ok thats right you are trying to use it with the artillery module....

You are kinda screwed there.

On my launcher with the exposed missile i had to use a script the old fashoned way that hides the missile texture when you fire the rocket and resets it upon reload.

Share this post


Link to post
Share on other sites

Well, damn. How would I set up such a script? I am terrible at scripting. :(

Share this post


Link to post
Share on other sites

OK, I'm trying to set up a hide animation for the missile that can be triggered by a script. So far, however, my efforts have been for naught. In the CfgModel entry for the vehicle, I added this:

		class missile_hide: damageHide
		{
			source="user";
			selection="missile";
		};

The missile object in the model is properly labeled "missile" in the named selections, and "missile" has been declared in both the skeleton and the "sections[]=" part of CfgModels.

In the config.cpp, I added the following entry

	class AnimationSources : AnimationSources {
		class missile_hide {
			source = "user";
			animPeriod = 1;
			initPhase = 0;
		};
	};

To test whether or not the missile would be hidden, I set the "initPhase" to 1, which should have made the missile invisible.

It doesn't.

Does anyone know what I am doing wrong here?

Share this post


Link to post
Share on other sites

		class missile_hide: damageHide
		{
			source="[color="Blue"]missile_hide[/color]";
			selection="missile";
		};

Try that for now.

And I think that the animations sources thing might need an edit too but I'm not certain. Tomorrow I can look at my files and provide better detail.

Share this post


Link to post
Share on other sites

Wouldn't I need to set the source in the AnimationSources to "missile_hide" as well?

		class AnimationSources : AnimationSources {
		class missile_hide {
			source = "[color="Blue"]missile_hide[/color]";
			animPeriod = 1;
			initPhase = 0;
		};
	};

Like that?

Share this post


Link to post
Share on other sites

The animation needs a controller, and that is the one you're defining in animationSources. Now, the engine needs to know when to fire off that animation controller, and that's the source of animationSources, or 'user' for a user action... then you have to make a new config group called userActions, IIRC. Like I said, I can review my files tomorrow.

Share this post


Link to post
Share on other sites
class AnimationSources : AnimationSources {

class missile_hide {

source = "user";

animPeriod = 1;

initPhase = 0;

};

};

this should be good (iirc) However it depends in model.cfg what you have inherited from Damagehide

class missile_hide: damageHide

{

source="user";

selection="missile";

};

Does it have a min max phase and a hidevalue ? whatare they ?

for example i have in a building like so ( its damage but thats just source control)

class hit1

{

type="hide";

selection="damagehide";

source="damage";

minValue = 0;

maxValue = 1;

minPhase = 0;

maxPhase = 1;

SourceAddress = 0;

hideValue = 0.05;

};

you shouldnt need a script really , just a fired eventhandler ( cba compatible if thats your route) , merely tell it to hide your proxy on fired,

from memory something like

class Eventhandlers

{

Fired = "(_this select 0) animate [""nameofproxy"",1]";

};

my "" maybe wrong its been a while but its how i did in the past

if you have other weapons you can run a check for wahts been fired isuppose

Passed array: [unit, weapon, muzzle, mode, ammo]

b1.54.73642 : [unit, weapon, muzzle, mode, ammo, magazine, projectile]

in addition , does it hide inside bulldozer when you rotate mouse already ?

Edited by Thromp

Share this post


Link to post
Share on other sites

[edit]

oops, I replied with an old window open that hadn't been updated with your post, lol

What do you mean by "when I rotate the mouse"?

[EDIT again]

Oh, I see what you mean. No, it doesn't disappear when I change the phase (I think that's the value) in Bulldozer to 1.000. Here's what I have in the model.cfg to test it with:

		class missile_hide
		{
			type = "hide";
			source="missile_hide";
			selection="missile";
			minValue = 0;
			maxValue = 1;
			minPhase = 0;
			maxPhase = 1;
			SourceAddress = "clamp";
			hideValue = 0.05;
		};

I also tried it with the "source" set to "user" with the same results.

Edited by Xeno426

Share this post


Link to post
Share on other sites

you have the bone in the model.cfg

"nameofproxy",""

it could also be hindered by weights to other bones too if your proxy moves , but for a simple hide proxy it shouldnt affect it .

you could also add the name of the proxy to selections but i think this is only for hidden textures .

also i dont think clamp is correct , i would remove that too leave at 0 or remove all the line maybe

Share this post


Link to post
Share on other sites

I think you probably want to make a named selection and include the proxy in the named selection instead of trying to make the proxy name into a bone.

In order to hide something via a user action I think the source of the animationSource should be the name of your defined user action. I'm not going home today, but tomorrow, and then I should be able to give you a better answer. Trying to recall this stuff half drunk on holidays is not working well ^_^

Edited by Max Power

Share this post


Link to post
Share on other sites
you have the bone in the model.cfg

"nameofproxy",""

I already did.

The missile object in the model is properly labeled "missile" in the named selections, and "missile" has been declared in both the skeleton and the "sections[]=" part of CfgModels.

Specifically, this is what I added.

			"missile", "OtocHlaven",

it could also be hindered by weights to other bones too if your proxy moves , but for a simple hide proxy it shouldnt affect it .

you could also add the name of the proxy to selections but i think this is only for hidden textures .

It's not a proxy anymore, it's actually part of the model, as per wld427's suggestion.

also i dont think clamp is correct , i would remove that too leave at 0 or remove all the line maybe

0 and "clamp" are the same thing for SourceAddress, just like "true" and 1 are the same thing for Memory.

I think you probably want to make a named selection and include the proxy in the named selection instead of trying to make the proxy name into a bone.

In order to hide something via a user action I think the source of the animationSource should be the name of your defined user action. I'm not going home today, but tomorrow, and then I should be able to give you a better answer. Trying to recall this stuff half drunk on holidays is not working well ^_^

So I need to go back to making it a proxy? The thing is I'm using the way the RAH-66 Comanche model hides it's various weapons for the different versions. While the Stinger and Hellfire missiles on the model are proxies, the rocket pods are not. In that model.cfg file, the pods are hidden by this code

		class ffar_launcherl_hide: damageHide { source="user"; selection="ffar_launcherl"; };

With "damageHide" being defined as

		class damageHide
		{
			type="hide";
			source="damage";
			selection="damageHide";
		};

The config for each RAH-66 variant then uses AnimationSources to turn on and off the various weapons from being shown. For instance,


		class ffar_launcherl_hide {
			source = "user";
			animPeriod = 1;
			initPhase = 1;
		};

		class ffar_launcherr_hide {
			source = "user";
			animPeriod = 1;
			initPhase = 1;
		};

is used to turn on the FFAIR launchers, as the the config sets the initPhase for all the hidden objects to "0". Additionally, none of these parts are listed in the hiddenSelections[] of the conifg.

Share this post


Link to post
Share on other sites

config.ccp

	class UserActions
	{	
		class someUserAction
		{
			displayName = "Some Name in Action Menu";
			onlyForPlayer = 1;
			position = "someMemoryPoint";
			priority = 1;
			radius = 4;
			condition = "someConditions"
			statement = "this animate [""someAnimation"", 1]";
		};
	class AnimationSources: AnimationSources
	{
		class someAnimation
		{
			source = "user";
			animPeriod = 2;
			initPhase = 0;
		};
	};

Model.cfg

	class Animations: Animations
	{
		class someParentAnimation;
		class someAnimation: someParentAnimation
		{
			source = "user";
			type = "hide";
			selection="someSelection";
		};

Whether or not the named selection includes a proxy or not does not matter.

Share this post


Link to post
Share on other sites

I don't want this hide animation to be accessible by the player or AI, kind of like the "stored" rotor animation found on the AH-1Z and UH-1Y models. Essentially, firing the weapon will trigger a script that hides the missile model. Will I be OK if I do not use the "UserActions" entry you have there?

Share this post


Link to post
Share on other sites

I think so. I'm not entirely sure, though, because I have never attempted to do such a thing. In my helicopter I have a custom animation source revolving the 20mm cannon. I think you can make a custom animation based on the weapon firing.

config.cpp

	class AnimationSources: AnimationSources
	{
		class someAnimationSource
		{
			source = "someSource";  //the animation controller to be used, 
                                                                 //for example, "reload" for a weapon firing

			weapon = "someWeapon";  //the specific weapon the above controller is to use
		};

mode.cfg

		class someAnimation: someParentAnimation
		{
			source = "someAnimationSource";
			selection = "someSelection";
			[...]
		};

Edited by Max Power

Share this post


Link to post
Share on other sites

If you look at my BRDM2IMP or 1S91 config you'll see the animations for the camonet hidden animation. They are animated to "1" at init, and the user action animates them to "0" to un-hide them.

If I'm following your progression, you could do a non-user animation in the script, and I think the only thing you'll need to do is add a "fired" eventhandler to activate the script.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×