Jump to content
tinboye

CreateEntity Import script

Recommended Posts

I am just curious if it is possible to import

 

this [
  "Exile_Trader_Equipment", //Trader Uniform
  "Exile_Trader_Equipment", //Trader Inventory
  "GreekHead_A3_09", //Face
  ["Acts_TreatingWounded01"], //Animation
  [14585.2,16759.8,0.126438], //Coords
  225.994 //Direction - No Comma
]

[
  "Exile_Trader_Equipment", //Trader Uniform
  "Exile_Trader_Equipment", //Trader Inventory
  "GreekHead_A3_09", //Face
  ["Acts_TreatingWounded01"], //Animation
  [14585.2,16759.8,0.126438], //Coords
  225.994 //Direction - No Comma
]

into eden using an eden script

 

when i export into sqf it looks like this.

private _npcs = [
["Exile_Trader_Food", ["Acts_CivilListening_2"], "Exile_Trader_Food", "WhiteHead_17", [[],[],[],["rds_uniform_Worker3",[]],[],[],"rds_Villager_cap4","G_Aviator",[],["","","","","",""]], [3738.84, 10200.7, 365.168], [0.82503, 0.565089, 0], [0, 0, 1]]
];
  
 {
      private _logic = "Logic" createVehicleLocal [0, 0, 0];
      private _trader = (_x select 0) createVehicleLocal [0, 0, 0];
      private _animations = _x select 1;

      _logic setPosWorld (_x select 5);
      _logic setVectorDirAndUp [_x select 6, _x select 7];

      _trader setVariable ["BIS_enableRandomization", false];
      _trader setVariable ["BIS_fnc_animalBehaviour_disable", true];
      _trader setVariable ["ExileAnimations", _animations];
      _trader setVariable ["ExileTraderType", _x select 2];
      _trader disableAI "ANIM";
      _trader disableAI "MOVE";
      _trader disableAI "FSM";
      _trader disableAI "AUTOTARGET";
      _trader disableAI "TARGET";
      _trader disableAI "CHECKVISIBLE";
      _trader allowDamage false;
      _trader setFace (_x select 3);
      _trader setUnitLoadOut (_x select 4);
      _trader setPosWorld (_x select 5);
      _trader setVectorDirAndUp [_x select 6, _x select 7];
      _trader reveal _logic;
      _trader attachTo [_logic, [0, 0, 0]];
      _trader switchMove (_animations select 0);
      _trader addEventHandler ["AnimDone", {_this call ExileClient_object_trader_event_onAnimationDone}];
  }
  forEach _npcs;

I am able to import objects using this:

collect3DENHistory{
    {
        private[ "_obj" ];
        _x params[ "_type", "_pos", "_rot" ];

        _obj = create3DENEntity [ "Object", _type, _pos, true ];
        _obj set3DENAttribute [ "rotation",[ 0,0,_rot ] ];

    }forEach [  	

but not sure how to use this for things like animations, uniform, face etc.

 

any help would be appreciated

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

×