Search the Community
Showing results for tags 'bark'.
Found 1 result
-
Just a little snippet that you can put in the init-field of a unit in oder to spawn a dog in its place. The dog is actually attached to the unit and the unit is made invisible. Therefor you can simply play, command or remotecontrol the unit in order to move the dog. Action menu (or the button to hold your breath) allows you to bark. If you go prone without moving, the dog will sit. if (isServer) then { 0 = [this,"Fin_random_F"] spawn { params ["_guy","_class","_act"]; private ["_dog"]; _dog = createAgent [_class, getPos _guy, [], 0, "CAN_COLLIDE"]; _dog setVariable ["BIS_fnc_animalBehaviour_disable", true]; _dog attachTo [_guy,[0,0,0]]; _guy hideObjectGlobal true; [_guy,["Bark", { params["_me","_you","_id","_d"]; _d playMoveNow "Dog_Idle_Bark"; _me setVariable["bark",true,true]; sleep 1.5; playSound3D [format["A3\Sounds_F\ambient\animals\dog%1.wss", ceil random 3], _me, false, getPosASL _me, 40, 1, 10]; sleep 2; _me setVariable["bark",false,true]; }, _dog, 0, false, true, "holdBreath", "_target isEqualTo _this", 0, false, ""]] remoteExec ["addAction", 0]; while {alive _guy && alive _dog} do { if (speed _guy > 10) then { _dog playMoveNow "Dog_Sprint"; } else { if (speed _guy > 6) then { _dog playMoveNow "Dog_Run"; } else { if ((speed _guy > 2) || (speed _guy < -2)) then { _dog playMoveNow "Dog_Walk"; } else { if !(_guy getVariable ["bark",false]) then { if ((stance _guy) == "STAND") then { _dog playMoveNow "Dog_Stop"; } else { if ((stance _guy) == "PRONE") then { _dog playMoveNow "Dog_Sit"; } else { _dog playMoveNow "Dog_Idle_Stop"; }; }; }; }; }; }; sleep 0.05; }; deleteVehicle _guy; }; }; Note that this is not meant to feel like playing as a dog, it is just a tool for gamemasters to have some easily controllable dogs that they can use.