Jump to content
Joshua9797

Hide metodes not working on dedicated servers

Recommended Posts

Hello, I am currently trying to hide vehicles (with and without crew) on a server, but unfortunately none of my approaches work.


here is a video of what happens every time:

 

Unfortunately, I'm not the owner of the server either, so I can't tell if the problem is with the server.

 

Here's what I've tried so far:

 

The Show / Hide module.

(here is a video of the module)

 

inside Init:

  • this hideObjectGlobal true;
  • this hideObject true;


inside a Trigger:

  • [HideObj1, true] remoteExec ["hideObjectGlobal"];
  • [HideObj1, true] remoteExec ["hideObject"];


Even the check mark "show model" doesn't work.


Of course everything works in the Editor MP.

Thank you in advance.

Share this post


Link to post
Share on other sites

The BIKI page says that the hideObjectGlobal command has to be executed on the server, so do that:

HideObj1 remoteExec ["hideObjectGlobal", 2];

 

Share this post


Link to post
Share on other sites

@7erra Thanks for the answer but unfortunately

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

didn't work either.


Another fun thing I noticed is that I can walk through the vehicle after the script. here is a video of that.

Share this post


Link to post
Share on other sites

Share a repro mission (simple mission file that exhibits the problem, no mods or extra scripts/etc.)

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Harzach said:

Share a repro mission (simple mission file that exhibits the problem, no mods or extra scripts/etc.)

@Harzach I have created a simple example mission and uploaded it to my GoogleDrive:
https://drive.google.com/file/d/1-gquVkX6PC6zEluy1Kz6HQgDSDZ5xRbS/view?usp=sharing

I would like to mention again that the problem only occurs on a dedicated server. Not on a local machine.

Share this post


Link to post
Share on other sites

Running on dedi, all vehicles were hidden when I walked through their triggers. You tested this repro mission in a dedi environment?

  • Like 2

Share this post


Link to post
Share on other sites

1 - global commands must be executed locally (usually on server if related to objects owned by server), so neither from a global trigger, nor an init field,

2 - remoteExecution is for executing, from a specific PC like server, or on multiple PCs like clients.

 

The specific variable this is working in init field(s) of the object(s), only. And that means, without any condition, all clients + server will run this code. So you can't use global commands as is. Use non-global ones:

 

this hideObject true; // potential problem with a JIP if this object has shifted for non-hidden in game. The JIP will set it as hidden again.

 

if (isServer) then {this hideObjectGlobal true}; // run on server only, that doesn't affect further state on JIP.

 

EDITED

 

Share this post


Link to post
Share on other sites

A little late but after a regular update of the server the problem didn't occur anymore.
So unfortunately I can't say what caused it.

but thank you very much for the help 7erra, Harzach and pierremgi.

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

×