Jump to content
Sign in to follow this  
Azza FHI

'removeuniform this' not working on dedicated

Recommended Posts

In what context are you running this?

You could always name the unit and run "removeuniform unit" from a script instead.

Share this post


Link to post
Share on other sites

Please provide more information. Post when & where you are using the command. Thanks.

kind Regards,

Pac Man

Share this post


Link to post
Share on other sites

just in the units init field. ive tried naming it and using the name but not from a script, didn't think it would make a difference but ill test.

the thing is using removeweapon in this way works on dedi but it just seem like removeuniform is broken.

---------- Post added at 18:16 ---------- Previous post was at 18:05 ----------

hmm never mind, I got it to work with if (isserver) then { [] execVM script.sqf}; in a trigger. weird that it doesn't work in the units init though yeah?

Share this post


Link to post
Share on other sites

Try if (isServer) then {removeUniform this};

If your missions has respawns and you want to remove uniforms from players, though, then neither your solution nor mine will work reliably. For missions with respawns you will have to have in your init.sqf (or script executed from init.sqf):

waitUntil {!isNull player};
sleep .01;
removeUniform player;

However it will remove the uniforms only from units that are being played by a player.

If you have a mission with both AI and respawnable players that need uniform removal, you'll have to mix both methods.

Share this post


Link to post
Share on other sites

However it will remove the uniforms only from units that are being played by a player.

So, does ArmA3 have an issue with server side changes of inventory do not make it to the players even from gamestart? Is all inventory local now or something strange?

Share this post


Link to post
Share on other sites

No. More because if you run a script on the player's machine on the player variable it will simply not run for non-player units...

The reason such a script is needed is because with respawn on and AI disabled, init lines might sometimes not run (and I could not find any consistency, except that sometimes the init line simply does nothing regardless of what I try to write in there). Unless they fixed it sometime, but I doubt it considering all the similar aged issues from ArmA 2 that still exist in ArmA 3.

This means for players in a respawn-based mission you will need to use a different method to assign any gear.

For missions/units where the init line will work correctly, you can assign the gear ON THE SERVER (via init or via calling a script from the init, but NOT execVM, and using the if (isServer) condition), and in A2 it even shows on the briefing screen in that case (because it is assigned before any player even loads the mission and thus is there before you even enter briefing). For JIP players nothing happens as the script is server-only. Of course this works great only on missions with no respawns, both because of JIP players needing their gear to be assigned as well (and in respawn missions their unit won't exist at mission start and thus the init line script might not work correctly), as well as because the init line might simply not run at all.

addUniform (and I suppose removeUniform as well) used to not transfer across the network in Alpha, but that was fixed at some point during Beta.

Edited by galzohar

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  

×