Jump to content
Sign in to follow this  
Guest

[Solved] HideObject in MP executed locally

Recommended Posts

Guest

Hello, I'm trying to remove vegetation in an area for a composition loaded with the debug console. I can only execute the script from my client since I don't have access to the server files.

{ _x hideObject true } foreach (nearestTerrainObjects [_newObject,["BUSH"],50]);

This code works for my client but the rest of the server can still see the vegetation. Also if I reconnect the vegetation would reappear.

{ waitUntil {!isNull _newObject}; { _x hideObject true } foreach (nearestTerrainObjects [_newObject,["BUSH"],50]); } remoteExec ["spawn", 0, True];

DarleneWhale on /r/armadev wrote me this which should've executed the code on all clients with JIP set to true. Unfortunately, I've hit a bump since the vegetation still doesn't disappear for the players nor me with this code. 

 

Does anybody know how I can execute the HideObject command locally so the vegetation disappears for all players on the server including the players that join/reconnect? Any help would be much appreciated. 

Share this post


Link to post
Share on other sites

@Gustav Bengtsson, use either

[_newObject, { waitUntil {!isNull _this}; { _x hideObjectGlobal true } foreach (nearestTerrainObjects [_this,["BUSH"],50]); }] remoteExec ["spawn", 2];

or

[_newObject, { waitUntil {!isNull _this}; { _x hideObject true } foreach (nearestTerrainObjects [_this,["BUSH"],50]); }] remoteExec ["spawn", 0, True];

 

  • Like 1

Share this post


Link to post
Share on other sites
Guest
Just now, Schatten said:

@Gustav Bengtsson, use either


[_newObject, { waitUntil {!isNull _this}; { _x hideObjectGlobal true } foreach (nearestTerrainObjects [_this,["BUSH"],50]); }] remoteExec ["spawn", 2];

or


[_newObject, { waitUntil {!isNull _this}; { _x hideObject true } foreach (nearestTerrainObjects [_this,["BUSH"],50]); }] remoteExec ["spawn", 0, True];

 

 

@Schatten Worked beautifully! Thank you very much!

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  

×