Search the Community
Showing results for tags 'function'.
Found 57 results
-
[SOLVED] Howto compile and preprocess a bunch of functions in one file?
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, usualy I write a function put it in an example.sqf and then I do this: fnc_example = compileFinal preprocessFile "example.sqf"; now I have a file with a bunch of functions in the file example_fncs.sqf like this: fnc_example_a = { }; fnc_example_b = { }; fnc_example_c = { }; how can I preprocess the file and precompile that functions for the later use with call and spawn?- 21 replies
-
- compile
- compileFinal
- (and 6 more)
-
Is anyone else having trouble with collapsing the search function in the object type tab in the attributes window? I'm running several mods but none that alter the editor, so I doubt that's the issue here. Whenever I open attributes of a vehicle the drop down list of the search function in the object type tabe overlaps the other function, and it won't go away so I can't acces them.
-
I d like to learn more about that command cause i ve to use it in near future i think. In another thread we stuck at the point where we d like to send one variable together with the command to the clients and tried to let the other variable get the Client itsself. this command should be executed on all clients: player reveal _desired_object; _desired_object should be sent from Server to all clients but player should be executed at the clients itsself to get the local player entity. EDIT: Could this be the solution?: _desired_object remoteExec ["player reveal", -2];
- 11 replies
-
- remoteExec
- call
-
(and 3 more)
Tagged with:
-
Take an array through a function [easy ?]
cybercoco posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
_fnc_Hp = { _this select _i from 0 to 2 do { round (((_this * -100) + 100)); }; }; _all = [_won getHit "motor",_won getHit "palivo",_won getHit "karoserie"]; hint format ["%1", _all]; sleep 2; hint format ["%1", _all call _fnc_Hp]; How do I take the array _all containing [_won getHit "motor",_won getHit "palivo",_won getHit "karoserie"] through the function _fnc_Hp -
Hello all, So I have been working on this mission for some time now, and at one point, I want this hint to come up and tell the player information regarding the objective. The player essentially has to chase a POI for a period of time. If the player gets a certain distance away from the POI, the mission fails (this part is already working). I would like to notify the player that they must keep within 50 meters, thus needing to use the hint. I looked up how to use the function BIS_fnc_advHint and found some good posts regarding the topic, such as this one. So I copied and pasted the example that darkdruid had confirmed to work and pasted this into my description.ext on an empty mission: class CfgHints { class test1 { displayName = "thisisatest"; class test2 { arguments[] = {}; description = "test Information text"; displayName = "test Information"; tip = "test test test"; }; }; }; and then this into a radio trigger: [["test1", "test2"]] call BIS_fnc_advHint; However, I am getting the error "Hint 'CfgHints >> test1 >> test2' does not exist Does anyone have any idea why this could be the case? It should work as I directly copied and pasted it into the description.ext (to remove risk of incorrectly typing something). Another question. Is there a way to display this hint only if the player fails when chasing the target for the first time? I.e. when the chase starts, the player gets more than 50 meters away from the POI, resulting in a mission failure. They restart to their last save (it autosaves right before the chase), and then the hint will display. Thanks for any assistance you guys can offer. EDIT: Alright, I have no idea why, but it is working now. Disregard this post as I figure out how to delete this.
-
Minimize number of similar lines in algorithm
cybercoco posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm sure there's a way to minimize the number of lines in this code. I have three variables, each of them needs to get through a simple math function : f(x)=10x. _var1 = 0.2; _var2 = 0.7; _var3 = 0.5; _array = [_var1,_var2,_var3]; _var1 = _var1 * 10; _var2 = _var2 * 10; _var3 = _var3 * 10; If I have let say ten vars, is it better to use the brute way (see snip above), use a foreach command or use a function (optimization wise). Probably the function, isn't it ? -
How to call function for an individual player
csk222 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello. How can I get the following code to work only for the person pressing the button? Right now if the button is pressed by anybody, it calls it for everybody. teg_fnc_sway0 = {player setCustomAimCoef 0;}; called like this: action = "[[],'teg_fnc_sway0',true,true] call BIS_fnc_MP;";