Jump to content
Sign in to follow this  
uiox

Proxies,Anims & cie

Recommended Posts

I've done a new M2 in 2 differents models link with a proxy, work well like the bis M2.

In mine I have several animations in the weapon/proxy and other in the maingun (the model with the proxies), animations in maingun work not in the proxy.

it's possible my own animations and hiddenselections in proxy with O2 and old CFG models?

I use old tools of course.

BTW it's a method for having a turret without bug exactly like in the game

My configs:

Model

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class cfgSkeletons

{

class All; // External class reference

class Land; // External class reference

class LandVehicle : Land {};

class StaticWeapon : LandVehicle {};

class NonStrategic; // External class reference

class uiox_M2L_Mg_Skeleton : StaticWeapon

{

isDiscrete=1;

skeletonInherit="";

skeletonBones[]=

{

"OtocVez","",

"OtocHlaven","OtocVez",

"RearmW","OtocVez",

"reculW","OtocVez",

"CanonReculW","OtocVez",

"AnimTriggerW","OtocVez",

"CoverW","OtocVez",

"usti hlavne","OtocVez",

"konec hlavne","OtocVez",

};

};

class uiox_M2L_Skeleton : StaticWeapon

{

isDiscrete=1;

skeletonInherit="uiox_M2L_Mg_Skeleton";

skeletonBones[]=

{

"OtocVez","",

"OtocHlaven","OtocVez",

"AnimBande","OtocVez",

"recul2","",

"usti hlavne","OtocVez",

"konec hlavne","OtocVez",

};

};

class uiox_M2TEject_Skeleton : NonStrategic

{

isDiscrete=1;

skeletonInherit="";

skeletonBones[]= { "CoverAmmoBox","",};

};

};

class cfgModels

{

class All; // External class reference

class Land; // External class reference

class LandVehicle : Land {};

class StaticWeapon : LandVehicle {};

class uiox_M2L_Mg: StaticWeapon

{

sectionsInherit="";

sections[]=

{

"","","","","","1","2","3","4","5","6","7","8",

"9","10","11","12","13",

"OtocHlaven","OtocVez",

"RearmW","reculW","CanonReculW","AnimTriggerW",

"CoverW","OtocHlaven","OtocVez","konec hlavne","usti hlavne"

};

skeletonName="uiox_M2L_Mg_Skeleton";

class Animations

{

class OtocVez

{

type = "rotationY";

source = "mainTurret";

selection = "OtocVez";

axis = "OsaVeze";

memory = true;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = rad 360;

};

class OtocHlaven

{

type = "rotation";

source = "mainGun";

selection = "OtocHlaven";

axis = "OsaHlavne";

memory = true;

sourceAddress = "clamp";

minValue = 0;

maxValue = 1;

angle0 = -rad 30;

angle1 = rad 60;

};

class uiox_Rearm

{

type="rotation";

source="";

selection="uiox_RearmW";

axis="axePoigneeRearm";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0=0;

angle1=-pi/400;

};

class recul

{

type="rotation";

source="";

selection="reculW";

axis="Axerecul";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/4000;  

};

class CanonRecul

{

type="rotation";

source="";

animperiod = 0.05;

selection="CanonReculW";

axis="AxeCanon";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/800;  

};

class AnimTrigger

{

type="rotation";

source="";

selection="AnimtriggerW";

axis="axetrigger";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/4;  

};

class Cover

{

type="rotation";

source="";

selection="coverW";

axis="axecover";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/2;  

};

};

};

class uiox_M2L: StaticWeapon

{

sectionsInherit="uiox_M2L_Mg";

sections[]=

{

"Mag","Mag1","Mag2","Mag3","Mag4","1","2","3","4","5","6","7","8",

"9","10","11","12","13","14","15","16","17","18",

"19","20","21","22","23","24","25",

"26","27","28","29","30","31","32","33","34",

"35","36","37","38","39","40","41",

"recul2","AnimBande",

"OtocHlaven","OtocVez",

"uiox_Rearm","recul","CanonRecul","AnimTrigger",

"Cover","OtocHlaven","OtocVez","konec hlavne","usti hlavne"

};

skeletonName="uiox_M2L_Skeleton";

class Animations

{

class OtocVez

{

type = "rotationY";

source = "mainTurret";

selection = "OtocVez";

axis = "OsaVeze";

memory = true;

sourceAddress = "loop";

minValue = 0;

maxValue = 1;

angle0 = 0;

angle1 = rad 360;

};

class OtocHlaven

{

type = "rotation";

source = "mainGun";

selection = "OtocHlaven";

axis = "OsaHlavne";

memory = true;

sourceAddress = "clamp";

minValue = 0;

maxValue = 1;

angle0 = -rad 30;

angle1 = rad 60;

};

class recul2

{

type="rotation";

source="";

selection="recul2";

axis="Axerecul2";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/4000;  

};

class AnimBande

{

type="rotation";

source="";

selection="AnimBande";

axis="AxeBande";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0= 0;

angle1= -pi/800;  

};

};

};

class NonStrategic; // External class reference

class uiox_M2TEject: NonStrategic

{

sectionsInherit="";

sections[]={"CoverAmmoBox"};

skeletonName="uiox_M2TEject_Skeleton";

class Animations

{

class Couvercle

{

type="rotation";

source="";

selection="Couvercle";

axis="Axe couvercle";

memory=0;

sourceAddress="clamp";

minValue=0;

maxValue=1;

angle0=0;

            angle1=Pi/2;  

};

};

};

};

NonAi (for declare proxy model)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgNonAIVehicles {

class ProxyGunner; // External class reference

class ProxyM2Gunner : ProxyGunner {};

class ProxyGoggles; // External class reference

class ProxyLeftHand; // External class reference

class ProxyNVG_Proxy : ProxyGoggles {

model = "\ca\Weapons\NVG_Proxy";

};

class ProxyDalekohled_Proxy : ProxyLeftHand {};

class ProxyWeapon {};

class ProxySecWeapon {};

class ProxyM2_Static : ProxyWeapon {

model = "\uiox_M2\uiox_m2L_mg";

simulation = "alwaysshow";

};

};

And finally the cfgvehicle (only M2 part)

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class uiox_M2D : StaticWeapon

{

scope = 2;

side = 1;

crew = "SoldierWB";

model = "\uiox_M2\uiox_M2L.p3d";

picture = "\ca\Weapons\data\ico\m2_mg_CA.paa";

icon = "\Ca\weapons\Data\map_ico\icomap_M2_CA.paa";

mapSize = 4;

sound[]={"\uiox_M2\sons\M2.wss",100,1};

reloadMagazineSound[]={"\uiox_M2\sons\ReloadM2base.wss",100,1};

displayName = $STR_uiox_M2fixe;

nameSound = "mgun";

typicalCargo[] = {"SoldierWB"};

extCameraPosition[] = {0, 0.6, -0.7};

hiddenSelections[]={"Mag","Mag1","Mag2","Mag3","Mag4","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41"};

// Phase 6 Try to connect Soldier's anims  ******** NOTE give up cause I think rtm of ofp are not compatible,will retry later

getInAction = "ManActLying";

getOutAction = "ManActUp";

// OFP version was gunner instead driver

//driverAction = "ManActuiox_AnimM2dem";

//driverInAction = "ManActuiox_AnimM2dem";

driverAction = "ManActCargo";

driverInAction = "ManActCargo";

class Turrets : Turrets

{

class MainTurret : mainturret

{

body = "OtocVez";

gun = "OtocHlaven";

gunAxis = "OsaHlavne";

gunBeg = "usti hlavne";

gunEnd = "konec hlavne";

minElev = -10;

minTurn = -70;

maxTurn = 70;

initTurn = 0;

//maxHorizontalRotSpeed = 0.5;

//maxVerticalRotSpeed = 0.5;

weapons[] = {"uiox_M2"};

magazines[] = {"uiox_M2Mag", "uiox_M2Mag", "uiox_M2Mag", "uiox_M2Mag"};

//gunnerAction = "ManActuiox_AnimM2dem";

gunnerAction = "AGS_Gunner";

};

};

class eventhandlers

{

init = [ _This select 0] exec "\uiox_M2\Scripts\events\Init.sqs";

Fired= [ _This select 0, _this select 1,_this select 2,_this select 3,_this select 4, "uiox_M2d",velocity(nearestObject [_this select 0 , _this select 4 ]), getpos (nearestObject [_this select 0 , _this select 4 ]),getDir (nearestObject [_this select 0 , _this select 4 ])] exec "\uiox_M2\Scripts\events\Fired.sqs";

};

// Convert Phase 5

// You need to define the animationsources param if you do your own animation in config models and define the anim period here

class AnimationSources

{

class uiox_Rearm

{

source = "";

weapon = "uiox_M2";

animPeriod=0.1;

};

class recul

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

class recul2

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

class CanonRecul

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

class AnimBande

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

class AnimTrigger

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

class Cover

{

source = "";

weapon = "uiox_M2";

animPeriod=0.05;

};

};

soundGetOut[] = {"\ca\Weapons\Data\Sound\m2gun_inout", 0.001, 1};

soundGetIn[] = {"\ca\Weapons\Data\Sound\m2gun_inout", 0.000316228, 1};

armorStructural = 10.0;

};

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  

×