alky_lee 279 Posted January 4, 2014 I have a SP mission where a BLUFOR (FIA) soldier starts in Civilian clothes. It works fine in the editor, but when I published the mission on Steam, he starts with no clothes. He starts next to a car and by the time he reaches the car he is setcaptive true so by then he should have CIV class. I put a spare set of clothes in the car but he still can't put them on. Am I doing something wrong? His loadout is contained in the unit init field. Example here - http://www.youtube.com/watch?v=B32fzI5QTto&feature=youtu.be Share this post Link to post Share on other sites
IndeedPete 1038 Posted January 4, 2014 Does this also happen when you export the mission just to SP-Missions? What does your code look liek exactly? I've had similar behaviour with setObjectTexture. I had to use that after mission init or the player controlled units wouldn't be affected by these changes. And the problem only occured in exported versions but not in the editor preview. Share this post Link to post Share on other sites
alky_lee 279 Posted January 4, 2014 (edited) The unit init is grp_ALPHA = group this; THIS setGroupId ["ALPHA SQUAD"]; this setidentity "Stavros"; removeallweapons this; removeallassigneditems this; removeuniform this; removevest this; removebackpack this; removeheadgear this; this addbackpack "B_AssaultPack_blk"; (unitbackpack this) addmagazinecargo ["DemoCharge_Remote_Mag",4]; (unitbackpack this) additemCargo ["9Rnd_45ACP_Mag",1]; (unitbackpack this) additemcargo ["hgun_ACPC2_snds_F",1]; this adduniform "U_C_Poloshirt_blue"; this addmagazine "9Rnd_45ACP_Mag"; this additem "FirstAidKit"; this additem "itemcompass"; this additem "itemmap"; this additem "itemradio"; this additem "itemwatch"; this addweapon "Binocular"; this assignitem "itemcompass"; this assignitem "itemmap"; this assignitem "itemradio"; this assignitem "itemwatch"; this assignitem "Binocular"; I've read in the multiplayer thread that removeuniform is a global command whereas adduniform is a local command and might cause a conflict, but I didn't think that would make much difference in a singleplayer mission. I know there are differences between the editor and when missions are uploaded but this doesn't explain why the player can't put clothes on from the vehicle when his side is CIV. EDIT: I have tried exporting to single player and he has no clothes there either, although NPCs with the same treatment are fully clothed. It only seems to affect the player. I have tried removing the removeuniform/adduniform commands and other parts of the init without success. It must fall foul of some unwritten rule. At least exporting to single player missions gives a good way to test. Edited January 5, 2014 by alky_lee Extra info Share this post Link to post Share on other sites
alky_lee 279 Posted January 5, 2014 I have tried various items of clothing, including that for his own side, and that doesn't work, although he can spawn with his default clothing. The only clothes I've found that stop him being naked are the Rangemaster & Competitor Suits. I suppose that that is better than looking like the terrorist that he is. It still doesn't answer the problem, but at least he is no longer running round in his underwear. Share this post Link to post Share on other sites
IndeedPete 1038 Posted January 5, 2014 Maybe try to run the code not from the init line (it's quite a lot anyway) but from shortly after init. Just a long shot, but something like this: Init line: nul = this execVM "setUpPlayer.sqf"; setUpPlayer.sqf: waitUntil {time > 0}; // your code... Share this post Link to post Share on other sites
drunken officer 18 Posted January 7, 2014 I've the same problem I load for all west units a uniform. I do this in my init file. As long i run this mission in the editor, everything is fine. If i save the mission as SP and switch to it, i got the original uniforms. {if (side _x == WEST) then {_x setobjecttexture [0,"scripte\....paa"];} forEach allunits I retexture the origianl uniform and changed the flag. I saved it as paa file DX 1. I didnt changed the size or something Share this post Link to post Share on other sites
Kydoimos 916 Posted January 7, 2014 I've also had problems with this - right everyone, to the feedback tracker! Share this post Link to post Share on other sites
alky_lee 279 Posted January 7, 2014 Based on what IndeedPete suggested I have got the following to work Players Init grp_ALPHA = group this; THIS setGroupId ["ALPHA SQUAD"]; this setidentity "Stavros"; null = [this] execVM "setUpPlayer.sqf"; //setUpPlayer.sqf waitUntil {time > 0}; _unit = _this select 0; removeallweapons _unit; removeallassigneditems _unit; removeuniform _unit; removevest _unit; removebackpack _unit; removeheadgear _unit; _unit addbackpack "B_AssaultPack_blk"; (unitbackpack _unit) addmagazinecargo ["DemoCharge_Remote_Mag",4]; (unitbackpack _unit) additemCargo ["9Rnd_45ACP_Mag",1]; (unitbackpack _unit) additemcargo ["hgun_ACPC2_snds_F",1]; _unit adduniform "U_C_Poloshirt_blue"; _unit addmagazine "9Rnd_45ACP_Mag"; _unit additem "FirstAidKit"; _unit additem "itemcompass"; _unit additem "itemmap"; _unit additem "itemradio"; _unit additem "itemwatch"; _unit addweapon "Binocular"; _unit assignitem "itemcompass"; _unit assignitem "itemmap"; _unit assignitem "itemradio"; _unit assignitem "itemwatch"; _unit assignitem "Binocular"; The player is waving his arms around a bit at the start, (I suppose he's putting his new clothes on!) but it does force him into civilian clothes. Even works on Steam. Share this post Link to post Share on other sites