Revert object_pickupAction back to execVM

I was not aware of the acutal behavior of the init eventHandler. The init eventhandler sends all the given arguments to the player before the mpframework got even load on the player, so it is basicly the same like the publicvariables. This means that the function object_pickupAction will be always nil because it gets defined far later after the init evenhandler fired already.
This commit is contained in:
AirwavesMan
2020-10-14 21:09:57 +02:00
parent bd8606aaf5
commit 57276dd61f
4 changed files with 132 additions and 136 deletions

View File

@@ -14,7 +14,7 @@ _name = getText (configFile >> _type >> _classname >> "displayName");
pickupInit = true;
if (_classname == "1Rnd_Arrow_Wood") then {
[_holder,_type,_classname,_name] spawn actionMonitor;
[_holder,_type,_classname,_name] execVM "\z\addons\dayz_code\actions\pickupActions\actionMonitor.sqf";
} else {
s_player_holderPickup = _holder addAction [format[(localize "str_init_take"),_name], "\z\addons\dayz_code\actions\pickupActions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
player reveal _holder;