Multiplayer Framework – Arma 2 Talk
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
[[Image:arma2_1.05.gif]] Some callers private variable may be changed calling any MPF function. See http://dev-heaven.net/issues/7117 for details. | [[Image:arma2_1.05.gif]] Some callers private variable may be changed calling any MPF function. See http://dev-heaven.net/issues/7117 for details. | ||
== simple callVar/rcallVar example (A2OA 1.63) == | |||
At first I had some difficulty understanding how to use callVar to execute code. I hope this is helpful to others --[[User:Benargee|Benargee]] ([[User talk:Benargee|talk]]) 22:40, 9 August 2015 (CEST) | |||
1. Define a code variable on every client. Easiest way is through init.sqf or initJIPcompatible.sqf | |||
<code style="display: block">'''myVarCode''' = {hint str _this; systemChat str _this;};</code> | |||
2. Execute this code. (use caller, target, local exec and persistent parameters as needed) | |||
<code style="display: block">[nil, nil, rcallVar, ["mystring",player,time,], '''myVarCode'''] call RE;</code> | |||
Hints and systemChats ["mystring",B 1-1-A:1 (Benargee), 121.627] |
Latest revision as of 11:52, 11 January 2023
First example of rHINT missing an argument? Also what is return value _nic? --Doolittle 18:48, 27 August 2009 (CEST)
bug in scriptCommands
Some callers private variable may be changed calling any MPF function. See http://dev-heaven.net/issues/7117 for details.
simple callVar/rcallVar example (A2OA 1.63)
At first I had some difficulty understanding how to use callVar to execute code. I hope this is helpful to others --Benargee (talk) 22:40, 9 August 2015 (CEST)
1. Define a code variable on every client. Easiest way is through init.sqf or initJIPcompatible.sqf
myVarCode = {hint str _this; systemChat str _this;};
2. Execute this code. (use caller, target, local exec and persistent parameters as needed)
[nil, nil, rcallVar, ["mystring",player,time,], myVarCode] call RE;
Hints and systemChats ["mystring",B 1-1-A:1 (Benargee), 121.627]