Jump to content
GODSPEEDSNAKE

A3 Mission Firing a script on Multiplayer Server

Recommended Posts

Hey all,

Been trying to work it out but nothing seems to be working... When I been testing it as the host was working but when uploading to a server to play multiplayer on... Basically im trying to have this fired on the server but for all players to see or in this case not see the player because they become invisible.

 

if (isServer) then {

private["_PD"];

_PD = _this select 0;

_PD setvariable ["no_grl", true];
_PD setvariable ["cloaked", true];
[_PD] spawn pred_FNC_Dis;
sleep 2;
_PD say3d "camo_on";
_PD setUnitTrait ["camouflageCoef",0.00001];
_PD setUnitTrait ["audibleCoef", 0.05];
sleep 1;
_PD hideObjectGlobal true;

};

So this works when i host and test play it... The if (isServer) then but I originally used if (hasInterface) but that doesn't work when we test on the server. Any help would be great...

Share this post


Link to post
Share on other sites

okay update so I scripted this and ran it and now works again BUT the player doesn't disappear now for some weird reason?!?!

if (hasInterface) then {

private["_PD"];

_PD = _this select 0;

_PD setvariable ["no_grl", true];
_PD setvariable ["cloaked", true];
[_PD] spawn pred_FNC_Dis;
sleep 2;
_PD say3d "camo_on";
_PD setUnitTrait ["camouflageCoef",0.00001];
_PD setUnitTrait ["audibleCoef", 0.05];
sleep 1;
_PD hideObjectGlobal true;

};

The hideObjectGlobal true; doesnt seem to work now 😞

Share this post


Link to post
Share on other sites

you could test:

[player, true] remoteExec ["hideObjectGlobal", 2];

 

Share this post


Link to post
Share on other sites

After you run that code you can check if the object is hidden with (isObjectHidden https://community.bistudio.com/wiki/isObjectHidden ) and its not visual glich or something else.
Also in footnotes of hideObjectGlobal is this:
 

Quote

As of A3 1,62.134494 running hideObjectGlobal in big loop may cause some objects not to be hidden for a players already connected or passed JIP. To avoid players rendering desync consider running that in preInit schedule of a server.

 

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

×