-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
-
Posts posted by jshock
-
-
Looks like they took the animation viewer out of debug mode. I'm in it now. I can execute an animation as long as I know what it is.. but the problem is that I don't know what it is.
-
Go into the editor place a player unit, preview, hit ESC go to Animation Viewer, click, search to your heart's desire.
-
Plenty of videos, I don't know about streamers though...
-
Ummm...you posted the original like 2 and a half hours ago, this isn't an instant message forum, you actually have to give time for someone to respond....
-
1
-
-
You may want to create your own function that adds the action, but then use get/set variable on the client with a unique key so that you may then access the action ID inherently on each client whenever you need to.
-
For Arma 2 and 3, what would be the best language to learn? i.e. C++? I read what killzone_kid posted for me and understand the base of the execVM, but want to learn more.
The language used is sqf, so learn that, but if your're looking for more of a real world application C++/Java would be a good start as Arma does mirror concepts in sqf.
However this is off topic from this thread, if you want to continue this discussion I recommend you PM someone or start your own discussion thread on the subject.
-
1
-
-
Most of the "lower level" tutorials out there use execVM because throwing people that have zero coding knowledge into function file structure, compilation, and optimization is just too complicated when a new coder just wants to create something as simple as a dynamic marker on an objective after it's completed. And since most people start on the lower levels, they don't learn about the use of call/spawn until later in their coding careers, so they use execVM instead, where they don't need to think about suspension or locality (as much anyways) or other topics that aren't so easily understood.
-
7
-
-
-
class Extended_PostInit_EventHandlers
{
class FLY_ChangeWeapons_Post_Init
{
init = "_handle = {[_x] execVM ""\FLY_ChangeWeapons\equip_change.sqf""} forEach allUnits;";
};
};
-
_array = [ ["Key 1", [0, 0, 0], [0, 0, 0]], ["Key 2", [0, 0, 0], [0, 0, 0]], ["Key 3", [0, 0, 0], [0, 0, 0]] ]; _searchKey = "Key 1"; _matchedArray = []; { _keyArray = _x; if ((_keyArray select 0) == _searchKey) exitWith { { _matchedArray pushBack _x; } forEach _keyArray; }; } forEach _array; _matchedArray;
Untested, but should work....but give you a concept.Forgot about the select command, use hallyGs post :D.
-
1
-
-
-
Or more simply
fallenSoldier addAction [ "My Action", { hint "My action exectuted"; }, nil, 6, true, true, "", "", 3 ];
Nice catch, obviously I'm not keeping up with all the changes as of late :P.
-
With the info you gave out yea, the action goes on the name of the solider you want the action to be applied to. You can put it in the init of that unit (change "fallenSoldier" to "this").
-
fallenSoldier addAction
[
"My Action",
{
hint "My action exectuted";
},
nil,
6,
true,
true,
"",
"_this distance _target < 3"
];
-
You need to remove all the actions that your fnc_bluSuitPowers adds add put a call to that above the _unit setVariable ["powers", false]; line.
-
Realized my stupid mistake (tired as hell atm), try this:
if !(player getVariable ["bluSuitPowers_eh",false]) then { [ "checkEquippedUniform", "onEachFrame", { params ["_unit"]; if (uniform _unit isEqualTo "U_B_Soldier_VR") then { if ( !(_unit getVariable ["powers", false]) ) then { [ [], "fnc_bluSuitPowers", _unit ] call BIS_fnc_MP; }; _unit setVariable ["powers", true]; } else { _unit setVariable ["powers", false]; }; }, [player] ] call BIS_fnc_addStackedEventHandler; player setVariable ["bluSuitPowers_eh",true]; };
-
1
-
-
I think your original solution is better
That solution only works if the player picks it up and equips it, but the OP stated that is not always the case (implies that the uniform could be applied directly to the player via script).
onEachFrame in this case shouldn't cause too much of a performance impact, unless you are adding a whole bunch of onEachFrame stacked event handlers, which is probably the issue here, so try the following, hopefully it works better, if it doesn't I'll need to see where you are actually using and putting the code.
if !(player getVariable ["bluSuitPowers_eh",false]) then { [ "checkEquippedUniform", "onEachFrame", { params ["_unit"]; if (uniform _unit isEqualTo "U_B_Soldier_VR") then { [ [], "fnc_bluSuitPowers", _unit ] call BIS_fnc_MP; } else { //remove suit powers }; }, [player] ] call BIS_fnc_addStackedEventHandler; player setVariable ["bluSuitPowers_eh",true]; };
-
1
-
-
initPlayerLocal.sqf:
[ "checkEquippedUniform", "onEachFrame", { if (uniform (_this select 0) isEqualTo "U_B_Soldier_VR") then { [ [], "fnc_bluSuitPowers", player ] call BIS_fnc_MP; }; }, [player] ] call BIS_fnc_addStackedEventHandler;
-
1
-
-
-
Hey Jshock do you still have the example mission from the first page of this thread??
The link no longer works
Thanks
I don't remember deleting it from my dropbox, but I guess I did somewhere down the line, however, greywolf's mission should be example enough:
-
2
-
-
fn_createBagFence = { _newBag = "Land_BagFence_Short_F" createVehicle position player; _newBag attachto [player, [0, 1, 0.5]]; _newBag setVectorDirAndUp [ [1,0,0],[0,0,1] ]; detach _newBag; player setVariable ["playerBag",_newBag]; }; _bag = player getVariable ["playerBag",nil]; if (isNil "_bag") then { [] call fn_createBagFence; } else { deleteVehicle _bag; [] call fn_createBagFence; };
EDIT: Ninja'd :P
-
Sure, but it does essentially the same thing as handling it in the normal init.sqf, I prefer the event scripts that you've mentioned, but some people haven't moved over to those yet, it's a matter of personal preference (I'm not sure if there is any optimizations to using the event scripts over separate handles within the init.sqf or not).
-
1
-
-
They are if you want to make absolute sure of the locality of something, especially when debugging, but overall, with those new commands they aren't as necessary when trying to actually execute code within a specific locality scope.
-
Hm, seems like BIS_fnc_randomPos isn't returning anything, so the central position doesn't provide any possible positions within the radius or the BIS function has changed since my use of it in that script, I've looked at the wiki and it seems the same to me. If the BIS function works for the foot patrol portion, I don't know why it won't work on the air patrol.
Way to use BIS_fnc_dynamicText in this script without it lagging it out?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
You need to put a sleep in that while loop.