private array updates + fixes

This commit is contained in:
vbawol
2013-05-26 12:23:31 -05:00
parent 04393b3383
commit 59905c1d18
123 changed files with 268 additions and 260 deletions

View File

@@ -1,8 +1,8 @@
private["_target", "_caller", "_id", "_params", "_pos"];
private ["_target","_id","_pos","_dog","_fsmid","_hasRawMeat","_hasdog"];
_target = _this select 0;
_caller = _this select 1;
//_caller = _this select 1;
_id = _this select 2;
_params = _this select 3;
//_params = _this select 3;
_pos = position _target;
_hasRawMeat = "FoodSteakRaw" in magazines player;
_hasdog = player getVariable ["dogid", "false"];
@@ -11,11 +11,12 @@ if ((_hasRawMeat) && (_hasdog == "false")) then {
player removeMagazine "FoodSteakRaw";
deleteVehicle (_this select 0);
_dog = (group player) createUnit [typeOf _target, _pos, [], 0, "FORM"];
player setvariable ["dogid", _fsmid];
_dog disableAI "FSM";
_fsmid = [_dog, typeOf _target] execFSM "\z\addons\dayz_code\system\dog_agent.fsm";
_fsmid setFSMVariable ["_handle", _fsmid];
_target removeAction _id;
player setvariable ["dogid", _fsmid];
} else {
cutText ["You must have RawMeat", "PLAIN DOWN"];
};