Sadly, that's not possible without creating a little mod. Characters are created on the engine side and are put together by config. Only commands available are setFace + setIdentity and they both works only with cfgFaces. It's a bit sad we can't do it in other way. Only characters you can fully customize with setObjectTexture are VR men. For normal characters only their clothing can be textured.
Hi. Depends if tent has source animation available. If it does, then it should be exactly as you done. Changing 1 to 0 should hide/unhide doors of the tent. To be able to animate, source has to be set to "user" by config. I tried this code with "Land_MedicalTent_01_NATO_generic_open_F" and it worked. Not really sure where is the problem if it didn't worked for you. Maybe wrong animation source name ?
//Hide/unhide doors
tent animateSource ["Door_Hide",0,TRUE];
//Debug-get all source animations
_animations = configProperties [(configfile >> "CfgVehicles" >> typeOf tent >> "AnimationSources"),"TRUE",TRUE] apply {configName _x};
systemChat str _animations;
In case when tent doesn't have any animation source, you would have to replace the object on the original position with original vector.
Something like this:
soldierXXXX_fnc_replaceWith = {
scriptName "soldierXXXX_fnc_replaceWith";
params ["_original","_new"];
private _pos = getPosWorldVisual _original;
private _dir = vectorDirVisual _original;
private _up = vectorUpVisual _original;
deleteVehicle _original;
private _object = _new createVehicle [0,0,0];
_object setPosWorld _pos;
_object setVectorDirAndUp [_dir,_up];
_object setVehicleVarName str _original;
missionNamespace setVariable [str _original,_object];
_object
};
[tent,"Land_MedicalTent_01_white_IDAP_open_F"] call soldierXXXX_fnc_replaceWith;
Hello,
is there a way to open and close the doors of the tents with in game via script? I tried - tent animateSource ["Door_Hide",1,true]; - or similar but didn't work.