506th IR Realism Unit
Recruiting => The Duty Desk => Topic started by: VandeVord on January 30, 2015, 02:37:15 PM
-
I'm trying to add specific text in an ammobox's scroll wheel menu. For example so I can insert a message or grid coords to assist in the mission.
Anyone know how to do this?
-
Yeah. Make a script in the mission that does an addaction to display a hint with whatever you need in it. More here: https://community.bistudio.com/wiki/addAction . Then just call the script in the init of the box.
-
I think he would have locality issues if he used hint in the init field of the box, wouldn't he?
-
I think he would have locality issues if he used hint in the init field of the box, wouldn't he?
Which is the reason I said to put it in a script. It should be called globally that way, I believe.
-
I think he would have locality issues if he used hint in the init field of the box, wouldn't he?
Which is the reason I said to put it in a script. It should be called globally that way, I believe.
AddActions are not global. they are client side. addActions have to be executed on every client.(If you want Everyone to be able to use it.) If im understanding what he is trying to do.
Use this function to add Action on every client
Fock_addactionMP =
{
private["_object","_screenMsg","_scriptToCall"];
_object = _this select 0;
_screenMsg = _this select 1;
_scriptToCall = _this select 2;
if(isNull _object) exitWith {};
_object addaction [_screenMsg,_scriptToCall];
};
Call the function like this.
[["Object or player here","<t color='#FF0000'>OnScreen Text</t>","Script you want to call here"],"Fock_addactionMP",nil,false] spawn BIS_fnc_MP;
-
I don't think that's right. Both hint and addaction have local effect. I believe the called script by addaction is only executed on the client of the player using the action.
EDIT: This message was in response to CPL Harrison. WO1 Genesi sounds like he is on the right track but I can't test this right now.
-
I don't think that's right. Both hint and addaction have local effect. I believe the called script by addaction is only executed on the client of the player using the action.
Ah, see, that's what I thought he wanted. I must've misunderstood what he was saying. Also, I just remembered that ARMA 3's localization is different than ARMA 2's, and I haven't done much scripting in A3.
-
You want to add grid coords to the text of the scroll menu or you want to display grid coords when you use the action?
-
You want to add grid coords to the text of the scroll menu or you want to display grid coords when you use the action?
I want to add grid coords to the text of the scroll menu, where you'd see inventory or arsenal, it would also have a writing with grids that when clicked doesnt do anything. I'm building a land nav thing.
-
You could make an image with the grid coords and then put it as the texture on a sign. I know Arma says you need to convert to .paa but .jpg works just fine.
-
You could make an image with the grid coords and then put it as the texture on a sign. I know Arma says you need to convert to .paa but .jpg works just fine.
I'd prefer not to do that since I want them to actual work to find the locations and not just spot a sign at 500m.
-
I think I have something that would work. Put this in the init box for the object you want the players to find:
this addAction ["<t color='#FFFF00'>Show Position</t>", { hint format ["Your coordinates are %1!", _this select 3] }, mapGridPosition this];
Tested this on a dedicated server with success.
-
I'm not sure how strings in sqf work off the top of my head, but you could getPos the grids of the box, store/convert them to a string, and then use them in the addAction.
-
I'm gonna test these ideas tomorrow, thanks guys.
-
I think I have something that would work. Put this in the init box for the object you want the players to find:
this addAction ["<t color='#FFFF00'>Show Position</t>", { hint format ["Your coordinates are %1!", _this select 3] }, mapGridPosition this];
Tested this on a dedicated server with success.
Works beautifully! Thank you very much Leshock.
-
Does anyone know what the classname for our infantry uniforms are?
None of these work on this page.
http://doc.rhsmods.org/index.php/USAF_Uniforms
-
Does anyone know what the classname for our infantry uniforms are?
None of these work on this page.
http://doc.rhsmods.org/index.php/USAF_Uniforms
Disregard.