Jump to content

Recommended Posts

Hello all,

 

I'm relatively new to scripting in Arma.

I am wondering whether someone could just explain the RemoteExec feature to me in the context of a chat message?

Currently I have:

[[West, "Base"], "Have you found anything?"] remoteExec ["SideChat", 0];

This lets me display a chat message for everyone on the server. I'm not sure why it is arranged the way it is compared to:

[west, "Base"] sideChat "Have you found anything?";

However, my main aim from this is to get a chat message from a named AI character (Variablename = Peterson) (Peterson's init: this setName ["Col. Peterson", "Colonel", "Peterson"];   ) to show as from "Col. Peterson" rather than "Base".

I understand this needs to be done through CustomChat but I don't understand how to formant the code to work with RemoteExec.

 

Any help would be much appreciated.

TIA,

Aurora

Share this post


Link to post
Share on other sites

I have managed to find a way around of doing it for now:

Change Peterson's callsign (Alpha 3-1) to (Col. Peterson), then use this:

[Peterson, "Have you found anything?"] remoteExec ["SideChat", 0];

Still would like to know how the RemoteExec works though... 🙂

Share this post


Link to post
Share on other sites
1 hour ago, Aurora152 said:

...
I'm not sure why it is arranged the way it is compared to: 
...

The "why" of such syntax is shown here:

https://community.bistudio.com/wiki/remoteExec#Syntax

Particularly this part:

// <params1> someScriptCommand <params2>;
[<params1>, <params2>] remoteExec ["someScriptCommand", targets, JIP];

 

So in

[west, "Base"] sideChat "Have you found anything?";

<params1> would be [west, "Base"]

and <params2> would be "Have you found anything?"

Put them in the [<params1>, <params2>] format and you get:

[[West, "Base"], "Have you found anything?"]

 

I hope that answers your question about how RemoteExec works.

  • Like 1

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

×