Jump to content

Sign in to follow this  
Kydoimos

Setobjecttexture Works for AI Uniforms on Multiplayer but Not for Player

Recommended Posts

I've moved this from the mission editing section to here:

So okay; here's what I've got: this setobjecttexture [0,"Altis_Camouflage_01.paa"]; nul = [this, [0,"Altis_Camouflage_01.paa"]] execVM "textureDisplay.sqf"; and then an .sqf file with:

_unit = _this select 0;

_texture = _this select 1;

_unit setObjectTexture _texture;

Now, what this does is it enables AI uniforms to be seen on multiplayer. But the players' are still not showing up - where am I going wrong? Ignore the double "" in this, but essentially it is what I've got: removeheadgear this; removevest this; removeuniform this; this addVest ""V_PlateCarrier2_rgr""; this addHeadgear ""H_HelmetB""; this adduniform ""U_I_CombatUniform""; this setobjecttexture [0,""NRF_US_Ranger_ACU_Empty.paa""]; nul = [this, [0,""NRF_US_Ranger_ACU_Empty.paa""]] execVM ""textureDisplay.sqf""; this unassignitem ""NVGoggles"";";

};

};

An example of the full code is: init="if(local this) then { removeallweapons this; removeheadgear this; removevest this; removebackpack this; removeUniform this; this unassignItem ""NVGoggles""; this removeItem ""NVGoggles""; this unassignItem ""ItemMap""; this removeItem ""ItemMap""; this unassignItem ""ItemGPS""; this removeItem ""ItemGPS""; this addUniform ""U_I_CombatUniform"";
this setobjecttexture [0,""NRF_US_Ranger_ACU_Empty.paa""]; nul = [this, [0,""NRF_US_Ranger_ACU_Empty.paa""]] execVM ""textureDisplay.sqf"";
this addVest ""V_TacVest_oli""; this addHeadgear ""H_HelmetCrew_I""; this addGoggles ""G_Combat""; this addWeapon ""rangefinder""; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""30Rnd_65x39_caseless_mag_Tracer"", 30]; this addMagazine [""SmokeShellBlue"", 30]; this addMagazine [""SmokeShellBlue"", 30]; this addMagazine [""SmokeShellBlue"", 30]; this addMagazine [""SmokeShellGreen"", 30]; this addMagazine [""SmokeShellGreen"", 30]; this addMagazine [""SmokeShellGreen"", 30]; this addWeapon ""arifle_MXC_F""; this addPrimaryWeaponItem ""optic_ACO_grn""; };";

description="19D Cavalry Crewman";

Share this post


Link to post
Share on other sites

*wall-of-text*

Cant read, but my guess is, AI units are typically LOCAL to server, Player is LOCAL to client(s).

Server is telling clients what all AI have as textures, but not Players

Share this post


Link to post
Share on other sites

Great Gnat! Cheers - any solutions you can suggest? Sorry about all that text! :)

Share this post


Link to post
Share on other sites

So how can I get the server to tell clients what the player is wearing?

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  

×