Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
node

Advanced Uniform Changing

Recommended Posts

Hello guys!! I would like to make a script for island life (Mod for Arma2 OA) that when you are playing as civilian you go up to the PMC Weapon Box scroll wheel and it will let you change your uniform to PMC uniforms but as well keeping the civ unit name such as Civ21 or Civ4. Any ideas how i would do this? :confused:

Share this post


Link to post
Share on other sites

A rough example on how to do it:

_newUnitModel = "PMC_skin_model";

_oldUnit = player;
_orginalDir = getDir player;
_orginalPosition = position player;
_orginalView = cameraView;
_playerSide = side player;

_dummyGroup = createGroup _playerSide;
[player] joinSilent grpNull;

_newUnit = _dummyGroup createUnit [_newUnitModel, _orginalPosition, [],0,"CAN_COLLIDE"];

addSwitchableUnit _newUnit;
setPlayable _newUnit;
selectPlayer _newUnit;
deletevehicle _oldUnit;
_newUnit setpos _orginalPosition;
_newUnit setdir _orginalDir;

//You might need to transfer money, inventory and stuff like that too, just do it the same way as the dir, pos etc.

player switchCamera _orginalView;

Share this post


Link to post
Share on other sites

PMC1ClothingChange.sqf

_obj = _this select 0;
_caller = _this select 1;
_id = _this select 2;

_obj removeAction _id;

variableAction1 = true;

_newUnitModel = "PMC_skin_model"; 

_oldUnit = player; 
_orginalDir = getDir player; 
_orginalPosition = position player; 
_orginalView = cameraView; 
_playerSide = side player; 

_dummyGroup = createGroup _playerSide; 
[player] joinSilent grpNull; 

_newUnit = _dummyGroup createUnit [_newUnitModel, _orginalPosition, [],0,"CAN_COLLIDE"]; 

addSwitchableUnit _newUnit; 
setPlayable _newUnit; 
selectPlayer _newUnit; 
deletevehicle _oldUnit; 
_newUnit setpos _orginalPosition; 
_newUnit setdir _orginalDir; 

//You might need to transfer money, inventory and stuff like that too, just do it the same way as the dir, pos etc. 

player switchCamera _orginalView;

init.sqf

variableAction1 = false;

Is this what it would kind of look like?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×