Jump to content
Sign in to follow this  
xeno426

Vehicle proxy and damaged tires issue

Recommended Posts

Hi,

Try something like... in your CfgModels definition.

class Animations {
   class missile_damage_hide {
       type="hide";
       source="damage";
       selection="missile_hide";
   };
   class missile_fired_hide {
       type="hide";
       source="direct";
       selection="missile_hide";
   };
};

You should then be able to initiatiate the anim 'missile_fired_hide' from any script (eg. your 'fired.sqf') with something like...

this animate ["missile_fired_hide",1];

I'd suggest making yourself a generic setHideFired.sqf though where you pass the 'anim name' & 'phase' to the script and have a 'call compile' construct... but that's up to you.

You don't need to setup a specific AnimationSources subclass in your config for this particular 'missile_fired_hide' anim.

Cheers, Sy.

PS. In the above code snippets I've not specified things like 'hideValue', 'min/maxValue' or 'min/maxPhase' etc. because in this instance you shouldn't need too specify them. The default values based on the AnimType & SourceType should be sufficient.

Share this post


Link to post
Share on other sites

Ok, this is annoying. If I change the missile bone to

		"missile", "",

Then the missile will hide when I set its phase to "1" in Bulldozer. However, this causes the missile to remain flush with the truck body, no longer moving with the turret. Changing the bone back to

		"missile_hide", "OtocHlaven",

the missile moves with the turret, but no longer disappears.

Share this post


Link to post
Share on other sites

Derp, my mistake. That "missile_hide" should just be "missile". Issue still stands, though.

Share this post


Link to post
Share on other sites

Synide's sample is along the lines of what I was thinking. Look at it like the gun animations - the recoil, rotation, etc. So instead of setting up a "recoil barrel" animation, you make a "hide barrel" animation. It will be just another gun animation that hides instead of rotating or recoiling. So here's what I had in mind:

 class animationsources {
	class missilefired_source {
	source = "reload";
	weapon = "yourmissile";
};
};

I don't know if "reload" vs. "direct" would make a difference in its behavior.

You could try this:

 class DefaultEventhandlers;
class EventHandlers: DefaultEventhandlers
{
fired = "[_this select 0] execVM '\yourmod\data\scripts\fired.sqf'; ";

};

Make the fired.sqf script do the hide animation. I don't think you need a proxy that way but again I'm not sure as I haven't tested this.

Share this post


Link to post
Share on other sites

Ok, figured it out (thanks to Max Powers for help on this). I used the animation provided by Max Powers, but I just had to add an extra bone between "otochlaven" and "missile_hide". This is what worked:

In the CfgSkeletons,

		"OtocVez", "",
		"OtocHlaven", "OtocVez",
		"missile_control", "otochlaven",
		"missile_hide", "missile_control",

And in CfgModels,

		class missile_fired_hide
		{
			type = "hide";
			selection="missile_hide";
			hideValue = 1;
		};

Now I just have to work on plugging this in to the config.cpp and setting up 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  

×