While working on some missions two separate problems came up and I decided I will just post them all in one thread. If you can only comment on one of the problems, feel free to do so anyway and skip the other.
AddAction command (BIS)
As I worked on some kind of Tactical Operation Center, I started to use BIS's "AddAction" command to allow the player to be able to access a variety of different options while looking at a object. Although this works out pretty well in SP, I would like to consult some of the more experienced scripters/ mission makers about its usefulness/ usage in an MP environment.
[A.1] Generally speaking: Is the usage of AddAction possible in MP and what does one have to take into account when doing so? As far as I can see, the effect of the command is local. Sadly I have very little knowledge regarding locality in the arma-verse (one of the reasons I usually try to avoid making any scripts myself) and do not know what that means. In particular, what happens in these two cases:
- Player A activates a AddAction command. For him, after he activated that action he has access to two more AddAction commands. This was due to the condition of the AddAction being activated by altering a variable status set on the object.
[A.2] Will Player B still see the original AddAction option or can he too now see the additional commands?
- Player A activates a AddAction command. This fires a script that will change the texture of a monitor object in front of him (using "setObjectTextureGlobal").
[A.3] Will Player B see this texture being applied to the monitor object or will he still see a "black" screen?
I do not know if there are any alternatives to AddAction. Even with a later addition of the ACE interaction interface, controlling different objects with that feature might not be as "clean" looking as with the scroll wheel action menu.
[A.4] Also, is there a limit on how many AddAction commands can be added to a object or in total to a mission? Last thing I want is to cause performance issues because of too many options. While testing in the editor I noticed that sometimes some of the AddAction commands did not show up on the object even though they did before and I have not touched that particular piece of code, nor does any other code interfere with it.
VKing's APP-64 markers
Another problem I ran across was the correct usage of VKing's APP-64 markers. I tried to stick to the documentation available in the forums, yet not everything seems to work out for me.
Following code works perfectly fine:
// Static markers ["vk_marker_blu_fpbE_hq",getPos fobE_tent_toc,west,["hq","inf","motor","inst","reduced","B"],0,2,west,"292/D",false] call vk_fnc_addMarker; ["vk_marker_blu_fpbW_hq",getPos fobW_container_toc,west,["hq","armor","arty","inst","reduced","Z"],4,2,west,"ADD",false] call vk_fnc_addMarker;
"fobE_tent_toc" and "fobW_container_toc" are placed objects and the markers show up perfectly on the objects position. Small problem though:
[V.1] What value would I have to enter if I do not wanna set a "group size" for one of the markers? For instance if I want to remove the "0" from the first marker above (5th parameter).
Now, when I tried to implement a Blue Force Tracker enabled marker attached to a unit or an empty vehicle, I got nothing. No script error and no marker in game. Following code was used:
// BFT markers (Attached to Units) ["vk_marker_blu_test",tester_1,west,["hq","inf","motor","reduced"],4,1,west,"292/D",true] call vk_fnc_addMarker; ["vk_marker_blu_fennek_1",fennek_1,west,["armor","recon","wheeled","E"],0,1,west,"5./292/D",true] call vk_fnc_addMarker; // BFT enabled vehicles and units fennek_1 setVariable ["vk_mods_markers_bft",[true,false,false,false,false],true];
The two markers in this example will not be shown on the map. Nor the one attached to "tester_1" or the one attached to "fennek_1". Both objects are played and named in the editor, one is a playable unit (BLUFOR) and one is an empty vehicle (Fennek, INSURGENTS).
That is basically all the code I got so far and only the two markers from the first example show up. [V.2] Is there anything wrong with the code or the implementation?
[V.3] How would I correctly initialize the markers for the desired effect? Do I have to run the script server side or client side? Again, locality is not something I am well-versed in.
I would really appreciate any help received. If you need more information, let me know and I will post it here. I intentionally did not paste in all the code from all the scripts related to the AddAction problem as it would be too much and as far as I can tell has no relevance to the question at hand.
Thanks in advance!