Jump to content

Recommended Posts

Hi. I'm new to Arma 3 scripting and mission editing. I have problems when I try to play my MP mission with some friends:

1. I have some custom textures on billboards and flags on my scenario:
for billboards on their init:

this setObjectTextureGlobal [0,"texture.paa"];

and for flag:

this setFlagTexture "Flag.paa";

I tried the scenario on eden as SP and MP myself and was working as intended.
Unfortunately when me and my friends try to load the real game with me as a host/server, we have some texture missing warnings. The strange thing is that not all the textures are missing, some of them are loading, and others don't.
All off them are placed on the mission root folder. Seems that is related with a path Issue because they get on the warning my local path "D:/users/me/..blablabla.../mp_missions/misionname/"

I double checked and all my textures are relative like the one you can see above. tried to re-save the mission without binary option and they told me got a script missing warning also.

I learned that setFlagTexture is not MP compatible: "In MP this command has to be executed where Flag Pole is local. If you add Flag Pole in the editor, it will be local to the server, so executing setFlagTexture on the server will change flag texture on all clients. The command is also persistent and is synchronised for JIP clients." I dont understand this at all.
Where I should do this. Should I add a line on the init.sqf  that says something like:

if (server) then {
private myflag setFlagTexture "Flag.paa";
}

about the missing path issues, i found this post: http://killzonekid.com/arma-scripting-tutorials-mission-root/
 is this related with my issue? which one of this approaches mentioned there should i use?  or should I load the setObjectTextureGlobal of each texture in the initPlayerLocal.sqf file instead?  or Load them with a remoteExec? can someone provide me a snippet of how to do this correctly?

Please advice.!!
2. I placed some units:

rCKDYNF.jpg

all of them are with BIS_fnc_ambientanim:

[this, "LISTEN_BRIEFING", "MEDIUM"] call BIS_fnc_ambientAnim;
0 = this spawn {waitUntil {behaviour _this == "combat"};  
  
 _this call BIS_fnc_ambientAnim__terminate;}

and the same as the other problem. When i test it myself works fine. when I'm with friends the position and altitude of all the units are messy, they sometimes are far away, and some do others don't. som do the anim, others don`t. some are trapped in between the first and second floor. What can i do? 

3. I would like to know how to test the mission like if I  was one of the clients. how can i achieve this?

Thank you so much. i really appreciate any help or advice you could give me. thanks.


  

Share this post


Link to post
Share on other sites

this setObjectTextureGlobal [0,"texture.paa"]; // NO

 

Just try:

if (local this) then {
  this setObjectTextureGlobal [0,"texture.paa"];
  myflag setFlagTexture "Flag.paa";
  [this, "LISTEN_BRIEFING", "MEDIUM"] call BIS_fnc_ambientAnim;
  0 = this spawn {
    waitUntil {behaviour _this == "combat"};
    _this call BIS_fnc_ambientAnim__terminate;
  };
};


 
 
 

  • Like 2

Share this post


Link to post
Share on other sites

thank you. i looked around and found some alternatives:

 

for the billboards, i placed this on the init field:

[this,[0,"texture.paa"]] remoteExec ["setObjectTexture"];

and the flag, on the init.sqf:
 

if (isServer) then { 
     flag1 setFlagTexture "flag.paa";
     flag2 setFlagTexture "flag.paa";
     auc setFlagTexture "auc.paa";


};

seems to work, but haven't tested yet. i'm on it and i will tell you.

Share this post


Link to post
Share on other sites

The problem with setObjectTextureGlobal and textures placed in the mission folder is that: you pass it a relative path to the texture in the mission folder; however, it will resolve to an absolute path, and then that path is attempted to be applied on other machines, which will not work since that absolute path is (likely) not valid on other machines. Instead, what I do, is apply the local version of setObjectTexture on all machines. If the billboard texture is never supposed to change, then you can get away with just doing this in the init lines: this setObjectTexture [0,"texture.paa"];

  • Like 2

Share this post


Link to post
Share on other sites

Same for bis_fnc_setUnitInsignia which uses setObjectTextureGlobal (and btw, setObjectmaterialGlobal often skipped for custom texture).

 

Not tested yet: getMissionPath ... To be confirmed in all cases : preview (un-pboed), steam subscribed (pboed),  on server (dedicated / hosted)...

Share this post


Link to post
Share on other sites
On 1/28/2020 at 9:50 AM, jdgaravito said:

for the billboards, i placed this on the init field:


[this,[0,"texture.paa"]] remoteExec ["setObjectTexture"];

No, just no. Never global remote exec from init field

  • Like 1

Share this post


Link to post
Share on other sites
On 1/27/2020 at 9:58 PM, jdgaravito said:

on their init: [...]

 

I tried the scenario on eden as SP and MP myself and was working as intended.
Unfortunately when me and my friends try to load the real game with me as a host/server, we have some texture missing warnings. The strange thing is that not all the textures are missing, some of them are loading, and others don't.

 

From the wiki :

Quote

If executed from a vehicle's init field (going against the above note), execution may happen too early and fail to broadcast over the network and to be JIP compatible.

https://community.bistudio.com/wiki/setObjectTextureGlobal

 

That's a JIP/sync issue, it's probably simpler to do that stuff from initserver.sqf.

Share this post


Link to post
Share on other sites
On 1/30/2020 at 11:26 AM, haleks said:

 

From the wiki :

https://community.bistudio.com/wiki/setObjectTextureGlobal

 

That's a JIP/sync issue, it's probably simpler to do that stuff from initserver.sqf.

yes, its related with JIP. for example if i enter the server first and then my friends, they get the right position of all the units. How can this be achieved on initserver.sqf?

On 1/28/2020 at 5:57 PM, Muzzleflash said:

The problem with setObjectTextureGlobal and textures placed in the mission folder is that: you pass it a relative path to the texture in the mission folder; however, it will resolve to an absolute path, and then that path is attempted to be applied on other machines, which will not work since that absolute path is (likely) not valid on other machines. Instead, what I do, is apply the local version of setObjectTexture on all machines. If the billboard texture is never supposed to change, then you can get away with just doing this in the init lines: this setObjectTexture [0,"texture.paa"];

what i did is on the init

_root = parsingNamespace getVariable "MISSION_ROOT";

[this,[0, _root + "texture.paa"]] remoteExec ["setObjectTexture"];

but i dont know how to do it without remoteExec. it worked and my friends can see the billboards, but i think for complex missions with more players will cause issues.

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

×