Jump to content
Sign in to follow this  
Radioman

Getting vehicle cargo death animation states, from vehicle config?

Recommended Posts

Does anyone know where the death animation states are stored, within the vehicle config?

I'm wanting to set AI/players as appearing unconscious / incapacitated within various vehicles, without hardcoding the animations.

I can get the cargo animation states via

				private ['_cName', '_anim', '_tveh'];
				_tveh = vehicle player;
				_cName = typeof _tveh;
				switch ((assignedVehicleRole player) select 0) do
				{
					case "Driver":
					{
						// -- Get driver's base animation.
						_anim = getText (configfile >> "CfgVehicles" >> _cName >> "driverAction");
					};
					case "Cargo":
					{
						private ['_tvCargo', '_tv'];
						_tvCargo = assignedCargo _tveh;
						_anim = getArray (configfile >> "CfgVehicles" >> _cName >> "cargoAction");
						_anim = _anim select (_tvCargo find player);
					};
				};

but not the death states, as I cannot find this entry in the config.

Any ideas? Thanks.

Share this post


Link to post
Share on other sites

config entry is in:

};
class CfgMovesMaleSdr: CfgMovesBasic
{
class States
{

Share this post


Link to post
Share on other sites
config entry is in:

};
class CfgMovesMaleSdr: CfgMovesBasic
{
class States
{

Where is this? Within the vehicle (ie, Hunter) config? Or the player/man's config?

Edit: Found them here: configfile >> "CfgMovesMaleSdr" >> "States"

Though, I don't know how to get the specific state, for each specific vehicle? Ie, an ATV, an Offroad, a Hunter, etc. Without hardcoding.

Share this post


Link to post
Share on other sites
try to use

playAction "Die";

Excellent, that works nicely. Thanks.

Share this post


Link to post
Share on other sites
Excellent, that works nicely. Thanks.

This actually doesn't work in all cases. For some reason, when called on a player within an Offroad, it makes them permanently stuck playing this action, even after calling player switchMove "";

And on ATVs, the player stands and dies, but, I suppose that's because the actual action when dying on an ATV, is to instantly eject from it.

is there any way to 'reset' an action? Other than switchmove ? The only way it would appear, is to have the player exit, and reenter the vehicle, which, isn't very useful in this script.

Ideas?

Thanks.

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  

×