Jump to content

Recommended Posts

Hello,

 

I've been working for quite sometime now on a cooperative mission.

But, there seems to pop up more issues when play testing on a friends locally hosted game.

I don't intend to support dedicated as I already have trouble getting locally hosted missions to work smoothly.

 

The issues I've encountered are as the following:

- Not being able to pick up ammo from dead unit's inventory, except for the host.

- Custom textures don't seem to load always, but sometimes.

- It seems like some triggers / SQF files don't fire at all, breaking some tasks.

- AI speech doesn't seem to match what I set in the identity of units. (Link to previous post)

- playMove / enableAI "move" doesn't seem to execute.

 

There seems to be many execution types to do remotely:

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

https://community.bistudio.com/wiki/remoteExecCall
https://community.bistudio.com/wiki/remoteExec

 

I'm just unsure on how to go about these issues and do the proper way to execute a command for a locally hosted game so it runs smoothly.

 

I've been designing missions for a while, but I'm a newcomer to scripting. I'd be more than happy to get this resolved so I can release the mission.

 

Thanks in advance! 🙂

Share this post


Link to post
Share on other sites
Quote

- Not being able to pick up ammo from dead unit's inventory, except for the host.

Really strange. Might be an addon issue?

 

Quote

- Custom textures don't seem to load always, but sometimes.

Are you using this one:

object setObjectTexture [selectionNumber,texture];

or this one:

obj setObjectTextureGlobal [selection, texture];

 

Quote

- It seems like some triggers / SQF files don't fire at all, breaking some tasks.

Triggers should work for all in most cases. What do those .sqf files have in them though?
 

Quote

 

- AI speech doesn't seem to match what I set in the identity of units.

 

Seeing the other post too I do not think there is vanilla French. Maybe a mod issue here. In any case you can try this:

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

Quote

 

- playMove / enableAI "move" doesn't seem to execute. 

 

PlayMove, taking as granted that it works in the Eden editor, needs to be run in the initPlayerLocal.sqf so as to run for all. Otherwise it only works for the host. A remoteExec might work too. The enableAI seems strange. Once that it was reported on one of our missions it was an addon issue as well. You can try a PATH instead of MOVE or a Simulation if the MOVE does not work.

 

Hope it all goes well in the end! Spending dozens of hours for a mission and seeing it is yet to work is really a pain   :smash:

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)
On 6/16/2020 at 2:37 PM, JohnKalo said:

Really strange. Might be an addon issue?

 

Are you using this one:


object setObjectTexture [selectionNumber,texture];

or this one:


obj setObjectTextureGlobal [selection, texture];

 

Triggers should work for all in most cases. What do those .sqf files have in them though?
 

Seeing the other post too I do not think there is vanilla French. Maybe a mod issue here. In any case you can try this:

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

PlayMove, taking as granted that it works in the Eden editor, needs to be run in the initPlayerLocal.sqf so as to run for all. Otherwise it only works for the host. A remoteExec might work too. The enableAI seems strange. Once that it was reported on one of our missions it was an addon issue as well. You can try a PATH instead of MOVE or a Simulation if the MOVE does not work.

  

Hope it all goes well in the end! Spending dozens of hours for a mission and seeing it is yet to work is really a pain   :smash:

 

I'm not using any mods, it's a completely vanilla mission.

Interestingly, boxes which I've added ammo into through the equipment category is able to be taken.

 

I'll try this, thanks!

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

For the French, Apex introduced french voices.

 

 

For the textures I'm using:

obj setObjectTextureGlobal [selection, texture];

 

There was a particular SQF that didn't seem to run, in which the players rescue a bunch of villagers being held captive:

v1 setBehaviour "CARELESS";
v1 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
sleep 5.4;
v1 enableAI "move";
v1 setcaptive false;
v1 doMove (getPos guns);

v9 setBehaviour "CARELESS";
v2 setBehaviour "CARELESS";
v7 setBehaviour "CARELESS";
v9 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v2 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v7 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
sleep 5.4;
v9 enableAI "move";
v9 setcaptive false;
v9 doMove (getPos guns);
v2 enableAI "move";
v2 setcaptive false;
v2 doMove (getPos guns);
v7 enableAI "move";
v7 setcaptive false;
v7 doMove (getPos guns);

v3 setBehaviour "CARELESS";
v10 setBehaviour "CARELESS";
v5 setBehaviour "CARELESS";
v3 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v10 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v5 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
sleep 5.4;
v3 enableAI "move";
v3 setcaptive false;
v3 doMove (getPos guns);
v10 enableAI "move";
v10 setcaptive false;
v10 doMove (getPos guns);
v5 enableAI "move";
v5 setcaptive false;
v5 doMove (getPos guns);

v4 setBehaviour "CARELESS";
v8 setBehaviour "CARELESS";
v6 setBehaviour "CARELESS";
v11 setBehaviour "CARELESS";
v4 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v8 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v6 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
v11 playmove "Acts_AidlPsitMstpSsurWnonDnon_out";
sleep 5.4;
v4 enableAI "move";
v4 setcaptive false;
v4 doMove (getPos guns);
v8 enableAI "move";
v8 setcaptive false;
v8 doMove (getPos guns);
v6 doMove (getPos guns);
v6 enableAI "move";
v6 setcaptive false;
v11 enableAI "move";
v11 setcaptive false;
v11 doMove (getPos guns);

It's funny because, it worked earlier in testing. It's like it sometimes runs and sometimes not.

How should I go about making the animations play for the AI villagers?

Edited by Dedmen
Removed all-bold. Rule 12
  • Like 1

Share this post


Link to post
Share on other sites
Quote

Interestingly, boxes which I've added ammo into through the equipment category is able to be taken.

Found this and in the buttom there is a solution:

https://feedback.bistudio.com/T126030

Seems to be caused by using the Arsenal when in the editor for some reason. Interesting indeed because it happens only to certain people. But Arma 3 has such things 🙂

 

Quote

For the textures I'm using:

Okay and for what sort of textures are we talking about please? A screen, a car or something else?

 

Quote

There was a particular SQF that didn't seem to run, in which the players rescue a bunch of villagers being held captive:

A simple solution would be to create or add at the end of the initPlayerLocal.sqf :

 

waitUntil {condition of the trigger goes here};

and then copy paste what you have in the .sqf file. Extra care because the waitUntil means that the rest of the initPlayerLocal.sqf will not run before the condition is met. So for conditions that will be met prior to the rescue hostages one should be before the particular waitUntil command.

Quote

 

It's funny because, it worked earlier in testing. It's like it sometimes runs and sometimes not.

How should I go about making the animations play for the AI villagers?

 

In Arma 3 strange things happen. A few days back in the description.txt I had a path "\images\image.jpg" and it did not work. For music and other images it does but for the particular image it needed "images\image.jpg". You mean the animations in the .sqf file? By the method above. If not still the same method. Hope all works 👍

Share this post


Link to post
Share on other sites

Moi 🙂

These are locality issues.

We are going to need some more code before we can help you further. For the action, you can setup the actions either on the server or add them for JIP. As for your code above, some tips:

Use a forEach loop for repeated actions. (small snippet) e.g.

v9 setBehaviour "CARELESS";
v2 setBehaviour "CARELESS";
v7 setBehaviour "CARELESS";
v9 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
v2 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
v7 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";

{
	_x setBehaviour "CARELESS";
	_x playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
} forEach [
	v9,
	v2,
	v7
];

You need to broadcast animations over the network using the remoteExec command. setObjectTexture has a global version, setObjectTextureGlobal as JohnKalo said. How are you creating your triggers? Eden or scripted? What is in the cond and on act fields?

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 6/16/2020 at 5:21 PM, JohnKalo said:

Found this and in the buttom there is a solution:

https://feedback.bistudio.com/T126030

Seems to be caused by using the Arsenal when in the editor for some reason. Interesting indeed because it happens only to certain people. But Arma 3 has such things 🙂

 

Okay and for what sort of textures are we talking about please? A screen, a car or something else?

  

A simple solution would be to create or add at the end of the initPlayerLocal.sqf :

 


waitUntil {condition of the trigger goes here};

and then copy paste what you have in the .sqf file. Extra care because the waitUntil means that the rest of the initPlayerLocal.sqf will not run before the condition is met. So for conditions that will be met prior to the rescue hostages one should be before the particular waitUntil command.

In Arma 3 strange things happen. A few days back in the description.txt I had a path "\images\image.jpg" and it did not work. For music and other images it does but for the particular image it needed "images\image.jpg". You mean the animations in the .sqf file? By the method above. If not still the same method. Hope all works 👍

 

On 6/16/2020 at 6:18 PM, HazJ said:

Moi 🙂

These are locality issues.

 We are going to need some more code before we can help you further. For the action, you can setup the actions either on the server or add them for JIP. As for your code above, some tips:

 Use a forEach loop for repeated actions. (small snippet) e.g.


v9 setBehaviour "CARELESS";
v2 setBehaviour "CARELESS";
v7 setBehaviour "CARELESS";
v9 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
v2 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
v7 playMove "Acts_AidlPsitMstpSsurWnonDnon_out";

{
	_x setBehaviour "CARELESS";
	_x playMove "Acts_AidlPsitMstpSsurWnonDnon_out";
} forEach [
	v9,
	v2,
	v7
];

You need to broadcast animations over the network using the remoteExec command. setObjectTexture has a global version, setObjectTextureGlobal as JohnKalo said. How are you creating your triggers? Eden or scripted? What is in the cond and on act fields?

 

I am yet to testing the solution for: MPclient can't take items from dead bodies

 

But I figured a way for the animations work with this:

[villager, "Acts_AidlPsitMstpSsurWnonDnon_out"] remoteExec ["playmove", 0];

 

I tried to execute the voices remotely by placing the command below in unit init:

[this, "Male01FRE"] remoteExec ["setSpeaker", 0, this];

But it didn't work. Something interesting to note, only the AI in command speak US English.

I wonder if best solution would be to simply silence the AI in command?

 

Now the textures I'm using setObjectTextureGlobal, but there's something interesting going on.

The error pops up always in the beginning, but some textures are visible for the client and the ones that are not shown are visible to the host, and vice versa.

Edited by Dedmen
Removed all-bold. Rule 12

Share this post


Link to post
Share on other sites

I found this somewhere, I was thinking if I can execute this remotely in init.sqf or initServer.sqf. I only know how to remoteExec one line commands, but how would I do with this script:

 

TAG_Voices = ["Male01FRE","Male02FRE","Male03FRE","Male01ENGFRE","Male02ENGFRE"];

{

 _unit = _x;

 if ((group (side _unit)) == "INDEPENDENT") then

 {

  _voice = selectRandom TAG_Voices ;

  _unit setSpeaker _voice ;

 };

} forEach allUnits;

 

By the way, I think the arsenal problem got solved. Thanks!

Share this post


Link to post
Share on other sites
22 hours ago, fin_soldier said:

But I figured a way for the animations work with this:


[villager, "Acts_AidlPsitMstpSsurWnonDnon_out"] remoteExec ["playmove", 0];

 

18 hours ago, fin_soldier said:

By the way, I think the arsenal problem got solved. Thanks!

Glad to hear that!

 

22 hours ago, fin_soldier said:

I tried to execute the voices remotely by placing the command below in unit init:


[this, "Male01FRE"] remoteExec ["setSpeaker", 0, this];

Since the wiki says to run the above on the server you can try placing the above in the initServer.sqf . If you have not got one you can create one. With this being the name of each unit. Either seperately or with a forEach command.

 

22 hours ago, fin_soldier said:

Now the textures I'm using setObjectTextureGlobal, but there's something interesting going on.

The error pops up always in the beginning, but some textures are visible for the client and the ones that are not shown are visible to the host, and vice versa.

What does the error say please? And the setObjectTextureGlobal is used for a screen, a vehicle, a unit or something else? Does it refer to a .jpg file or something else.

Share this post


Link to post
Share on other sites
Posted (edited)
On 6/18/2020 at 2:57 PM, JohnKalo said:
On 6/17/2020 at 4:01 PM, fin_soldier said:

I tried to execute the voices remotely by placing the command below in unit init:



[this, "Male01FRE"] remoteExec ["setSpeaker", 0, this];

Since the wiki says to run the above on the server you can try placing the above in the initServer.sqf . If you have not got one you can create one. With this being the name of each unit. Either seperately or with a forEach command.

 

 

I've got quite a lot of units place out, so I was wondering how to execute it to all of independent.

That's how I found this, but how would I execute this remotely? Or if it's place in initServer.sqf, does it even have to be executed remotely?

TAG_Voices = ["Male01FRE","Male02FRE","Male03FRE","Male01ENGFRE","Male02ENGFRE"];

{

  _unit = _x;

 if ((group (side _unit)) == "INDEPENDENT") then

 {

  _voice = selectRandom TAG_Voices ;

  _unit setSpeaker _voice ;

  };

 } forEach allUnits;

 

On 6/18/2020 at 2:57 PM, JohnKalo said:
On 6/17/2020 at 4:01 PM, fin_soldier said:

Now the textures I'm using setObjectTextureGlobal, but there's something interesting going on.

The error pops up always in the beginning, but some textures are visible for the client and the ones that are not shown are visible to the host, and vice versa.

What does the error say please? And the setObjectTextureGlobal is used for a screen, a vehicle, a unit or something else? Does it refer to a .jpg file or something else.

 

The textures are used in "User Texture 1x1" object, as well as "MapBoard_Malden_F" and "Land_WallSign_01_chalkboard_F".

It's funny because the client seem to be able to see the "User Texture 1x1" textures, while the host can't. But the host can see "MapBoard_Malden_F" and "Land_WallSign_01_chalkboard_F" and the client can't. Something to note is that "Land_WallSign_01_chalkboard_F" has two texture options: Texture #1 and Texture #2, but I don't really know how to put setObjectTextureGlobal for both of Texture slots.

 

I'm using .paa files.

Edited by Dedmen
Removed all-bold. Rule 12

Share this post


Link to post
Share on other sites

Completely untested maybe this could work:

 

TAG_Voices = ["Male01FRE","Male02FRE","Male03FRE","Male01ENGFRE","Male02ENGFRE"];

{

  _unit = _x;

 if ((group (side _unit)) == "INDEPENDENT") then

 {

  _voice = selectRandom TAG_Voices ;
 [_unit, "_voice"] remoteExec ["setSpeaker", 0, _unit];

  };

 } forEach allUnits;

For the textures you can try using the obj setObjectTextureGlobal [selection, texture] through a trigger. Triggers are meant to work for all clients and hosts so you can place a condition true trigger and place the texture lines you want there. That will most likely work. The two textures corespond to the "selection" of the command. The selection can be 0 or 1 or 2 if I recall correctly. Hope the above work as intended!!! 

Share this post


Link to post
Share on other sites
On 6/19/2020 at 2:06 PM, JohnKalo said:

Completely untested maybe this could work:

 


TAG_Voices = ["Male01FRE","Male02FRE","Male03FRE","Male01ENGFRE","Male02ENGFRE"];

{

  _unit = _x;

 if ((group (side _unit)) == "INDEPENDENT") then

 {

  _voice = selectRandom TAG_Voices ;
 [_unit, "_voice"] remoteExec ["setSpeaker", 0, _unit];

  };

 } forEach allUnits;

For the textures you can try using the obj setObjectTextureGlobal [selection, texture] through a trigger. Triggers are meant to work for all clients and hosts so you can place a condition true trigger and place the texture lines you want there. That will most likely work. The two textures corespond to the "selection" of the command. The selection can be 0 or 1 or 2 if I recall correctly. Hope the above work as intended!!! 

 

The script gave an error, but I had a friend who told me that setSpeaker is obsolete, and I should use BIS_fnc_setIdentity instead.

Is this true? I am yet to test this.

 

By the way, I got the textures working with simply using setObjectTexture without it being Global, as it is for local host after all.

Making the textures simple objects interfered with it also, so I disabled that.

Share this post


Link to post
Share on other sites

setSpeaker is not obsolete. At least according to the Wiki.

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

Quote

Sets the speaker of a person. In order to setSpeaker dynamically in MP, the command needs to run on every computer with exactly the same params otherwise the speaking unit could appear silent on other PCs. Run this on server:

 

Share this post


Link to post
Share on other sites
13 hours ago, HazJ said:

setSpeaker is not obsolete. At least according to the Wiki.

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

 

 

I tried going through each Independent unit with this:

[this, "Male01FRE"] remoteExec ["setSpeaker", 0, this];

Still didn't work.

It seems like all they units with ambient animations seem to start speaking US English, so I thought perhaps executing simply through init.sqf on start the script below:

 

On 6/19/2020 at 3:06 PM, JohnKalo said:

Completely untested maybe this could work:

 


TAG_Voices = ["Male01FRE","Male02FRE","Male03FRE","Male01ENGFRE","Male02ENGFRE"];

{

  _unit = _x;

 if ((group (side _unit)) == "INDEPENDENT") then

 {

  _voice = selectRandom TAG_Voices ;
 [_unit, "_voice"] remoteExec ["setSpeaker", 0, _unit];

  };

 } forEach allUnits;

For the textures you can try using the obj setObjectTextureGlobal [selection, texture] through a trigger. Triggers are meant to work for all clients and hosts so you can place a condition true trigger and place the texture lines you want there. That will most likely work. The two textures corespond to the "selection" of the command. The selection can be 0 or 1 or 2 if I recall correctly. Hope the above work as intended!!! 

 

The gives an error as below:

 

KiMASSW.jpg

Share this post


Link to post
Share on other sites

Moi,

Make sure the speaker is valid. Try with another to make sure just in case. It could be the Wiki just doesn't have all the speakers listed. I'm not able to go in-game to fetch them all currently. The error is because you are wrapping the _variable inside quotes.

{
    if (side _x isEqualTo independent) then {
        _voice = selectRandom ["Male01GRE", "Male02GRE", "Male03GRE", "Male04GRE", "Male05GRE"];
        [_x, _voice] remoteExec ["setSpeaker", 0, _x];
    };
} forEach allUnits;

The Wiki lists the following:

Male01_F - Male01ENG(B) - Male01GRE - Male01PER
Male02_F - Male02ENG(B) - Male02GRE - Male02PER
Male03_F - Male03ENG(B) - Male03GRE - Male03PER
Male04_F - Male04ENG(B) - Male04GRE - Male01PER
Male05_F - Male05ENG - Male05GRE - Male02PER
Male06_F - Male06ENG - Male02GRE - Male03PER
Male07_F - Male07ENG - Male03GRE - Male01PER
Male08_F - Male08ENG - Male04GRE - Male02PER

 

  • Like 2

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

×