Jump to content
Sign in to follow this  
Spatsiba

setName using identities.hpp

Recommended Posts

Hey! 

 

I've been trying to modify the civilian presence module by BIS to be used on community ported maps like Chernarus. I've got this code working so far (Put in "Code On Unit Created"): 

//	Set clothes
_civs	=	[ 
//	Factory
"LOP_CHR_Civ_Worker_03",
"LOP_CHR_Civ_Worker_04",
"LOP_CHR_Civ_Worker_01",
"LOP_CHR_Civ_Worker_02",
"LOP_CHR_Civ_Worker_06",
"LOP_CHR_Civ_Worker_05",
"LOP_CHR_Civ_Worker_07",

//	Forest
"LOP_CHR_Civ_Woodlander_06",
"LOP_CHR_Civ_Woodlander_05",
"LOP_CHR_Civ_Woodlander_01",
"LOP_CHR_Civ_Woodlander_02",
"LOP_CHR_Civ_Woodlander_03",
"LOP_CHR_Civ_Woodlander_04",

//	Town
"LOP_CHR_Civ_Citizen_06",
"LOP_CHR_Civ_Citizen_05",
"LOP_CHR_Civ_Citizen_07",
"LOP_CHR_Civ_Citizen_03",
"LOP_CHR_Civ_Citizen_04",
"LOP_CHR_Civ_Citizen_02",
"LOP_CHR_Civ_Citizen_01",

//	City
"LOP_CHR_Civ_Profiteer_04",
"LOP_CHR_Civ_Profiteer_01",
"LOP_CHR_Civ_Profiteer_03",
"LOP_CHR_Civ_Profiteer_02",

//	Gay
"LOP_CHR_Civ_Rocker_03",
"LOP_CHR_Civ_Rocker_01",
"LOP_CHR_Civ_Rocker_04",
"LOP_CHR_Civ_Rocker_02",

//	Village
"LOP_CHR_Civ_Villager_01",
"LOP_CHR_Civ_Villager_04",
"LOP_CHR_Civ_Villager_03",
"LOP_CHR_Civ_Villager_02"
]; 
_loadOut = getUnitLoadOut (selectRandom _civs);  
_this setUnitLoadout _loadOut;

//	SetFace
 _num = round Random 23; 
_face = ["whiteHead_", _num] joinString "";
if (isServer) then {[_this, _face] remoteExec ["setFace", 0, _this]};

//	SetName

However their names are still greek. Since Bohemia didn't allow us to select a faction but rather "Auto detects" whether we're on Tanoa or Altis using this module in a community made map is 99% of the time going to be a pain. 

 

Is there anyway to use 

#include "rhsafrf\addons\rhs_c_troops\identities.hpp"

and grab names from identities.hpp files like you do in mods? 

Use use setName to turn Garkos Kortas into Roman Bytchok? 

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  

×