Tajin 348 Posted September 29, 2017 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. 8 1 Share this post Link to post Share on other sites
Midnighters 152 Posted September 29, 2017 this is really neat, thanks for sharing Share this post Link to post Share on other sites
EO 11224 Posted September 29, 2017 Pretty neat and useful. Thanks for sharing. ....might need to edit the code in the OP, It's almost a double post, copy and pasting what's there currently results in a double doggy spawn that are uncontrollable. 1 Share this post Link to post Share on other sites
FireWalker 329 Posted September 30, 2017 Oh no! Not a Double Doggy Spawn! Say it aint so! 1 Share this post Link to post Share on other sites
Tajin 348 Posted September 30, 2017 oh, my bad. Made a little correction and accidentially pasted it twice xD Its ok now. 2 Share this post Link to post Share on other sites
marki980908 23 Posted October 4, 2021 Is there a way to do this in zeus instead of eden? Share this post Link to post Share on other sites
Melody_Mike 127 Posted October 18, 2021 @marki980908 Sure, if the debug console is enabled (or you are the admin), you can execute code in the unit attributes. See: https://community.bistudio.com/wiki/Arma_3:_Debug_Console Share this post Link to post Share on other sites
marki980908 23 Posted October 18, 2021 3 minutes ago, Melody_Mike said: @marki980908 Sure, if the debug console is enabled (or you are the admin), you can execute code in the unit attributes. See: https://community.bistudio.com/wiki/Arma_3:_Debug_Console It doesnt seem to work for some reason in zeus with Zeus Enhanced Share this post Link to post Share on other sites
Melody_Mike 127 Posted October 18, 2021 How exactly does it go wrong? If, for example, you cannot get script to work from the unit attributes, then you could give the unit a variable name when editing the mission file, then reference that when entering the code from the server debug console. Eg: if (isServer) then { 0 = [DogCharacterVarName,"Fin_random_F"] spawn { ... Share this post Link to post Share on other sites