Logi Posted October 31, 2014 Report Share Posted October 31, 2014 I have been playing Epoch for about 3 months and I have never had a tame dog or seen anyone with one. So I thought rather than chasing after one with some raw meat, I would do it the easy way. I had no idea how the dogs worked so I just looked at the Epoch files and throw this basic script together. I am sure that it is not perfect and it has only been used for a very short time on my test server. I was intending to create some custom scripts for the dog to give it some actual purpose. But I don't really have the time at the moment. I did create a little script which made the dog bark every 5 seconds if there was another player or zombie within 100m. But I am sure that there are better uses for the dog. You could have a dog spawn when the player spawns or let players buy a dog. There is a dog kennel in the editor. On my test server I was just spawning the dog with a bar of gold. The script will probably need a bit of tweaking if you are going to put it on a live server. http://youtu.be/ZPFQltAZTw8 Script. private ["_hasdog","_type","_pos","_dog","_animalID","_fsmid"]; closedialog 0; // Check if player currently has a dog _hasdog = player getVariable ["dogID", 0]; if (_hasdog == 0) then { _type = "DZ_Pastor"; _Pos = getPosATL player; // Create dog _dog = createAgent [_type, _Pos, [], 0, "NONE"]; PVDZE_zed_Spawn = [_dog]; publicVariableServer "PVDZE_zed_Spawn"; _animalID = [_pos,_dog] execFSM "\z\addons\dayz_code\system\animal_agent.fsm"; // Tame dog _animalID = _dog getVariable "fsm_handle"; _animalID setFSMVariable ["_isTamed", true]; _dog disableAI "FSM"; (group _dog) setBehaviour "AWARE"; _fsmid = [_dog, typeOf _dog] execFSM "\z\addons\dayz_code\system\dog_agent.fsm"; _fsmid setFSMVariable ["_handle", _fsmid]; player setVariable ["dogID", _fsmid]; _dog setVariable ["fsm_handle", _fsmid]; _dog setVariable ["CharacterID", dayz_characterID, true]; systemChat "Your dog has been spawned!"; } else { systemChat "You already have a dog!"; }; cheech, calamity and Creep 3 Link to comment Share on other sites More sharing options...
fireplace Posted October 31, 2014 Report Share Posted October 31, 2014 Sounds cool! Would you be willing to share the script for the dog barking, when someone near? Link to comment Share on other sites More sharing options...
fireplace Posted October 31, 2014 Report Share Posted October 31, 2014 just tested it out and it works great! For people wondering how to install it, I just added it to the right click on the radio. class ItemRadio { class Use { text = "Summon Dog"; script = "execVM 'scripts\tame_dog.sqf'"; }; }; Just change the 'scripts\tame_dog.sqf'"; to whatever you named the file and where you placed it Link to comment Share on other sites More sharing options...
DimitriPokki Posted October 31, 2014 Report Share Posted October 31, 2014 how to update add price(cashmoney) to tame dog Link to comment Share on other sites More sharing options...
Logi Posted October 31, 2014 Author Report Share Posted October 31, 2014 Sounds cool! Would you be willing to share the script for the dog barking, when someone near? I am not sure where I put it, but the script is very basic. You can just run a loop while the dog is alive, counting the number of players and the number of zombies within a specified distance. Then while the count is above zero, have the dog bark then add a sleep for 5 seconds or whatever you want. Here are the commands for making the dog perform the bark animation and the bark sound. _dog playActionNow "GestureBark"; [_dog,"dog_bark",0,false] call dayz_zombieSpeak; how to update add price(cashmoney) to tame dog It depends how you are planning on spawning the dog. A very easy but unrealistic way would be to spawn the dog by right clicking a gold bar. Then you can add [player, "ItemGoldBar", 1] call BIS_fnc_invRemove; That way after the player has clicked the gold bar and spawned a dog, the goldbar will be removed from the players inventory. Or you could do what fireplace has done and spawn it using a radio. If you are using the radio, you would first need to check if the player actually has the gold before removing it from their inventory. You could try to add the dog to a trader but that would be more difficult. I was thinking about using the dog kennel in a trader zone and having a scroll menu option appear if the player is within x meters from the dog kennel and the player has above x amount of money ect. Or maybe have the dog spawn when a player lays a plot pole, then have it patrol within range of the plot pole. I only released this small script so that people could have a bit of fun with the dogs, how you implement the script is entirely up to you, there are many different ways that you could do it. Link to comment Share on other sites More sharing options...
calamity Posted October 31, 2014 Report Share Posted October 31, 2014 I added right click rawmeat and cost is rawmeat. for deploy anything... overwrites\config.sqf ["FoodSteakRaw","call a dog","execVM 'custom\tame_dog.sqf';","true"], at bottom of tame_dog.sqf systemChat "Your dog has been spawned!"; player removeMagazine 'FoodSteakRaw'; } else { systemChat "You already have a dog!"; }; battleye kicks publicvariable.txt I added 5 "remExFP" !="switchmove" !="say" !="z_dog_bark_1", !="Dog_SitDown" !="dog_callBack" publicvariableval.txt // 5 "dog_" thankz for the share.... Link to comment Share on other sites More sharing options...
CartoonrBOY Posted November 2, 2014 Report Share Posted November 2, 2014 I'm using the emerald designer mod to spawn a dog when near a kennel with raw meat. private["_isKennel"]; _isKennel = cursorTarget isKindOf "MAP_psi_bouda"; if (_isKennel) then { if (s_player_doggy < 0) then { s_player_doggy = player addaction["Heel hound", "fixes\tame_dog.sqf", cursorTarget, 1, false, true, "",""]; }; } else { player removeAction s_player_doggy; s_player_doggy = -1; }; I added an extra parameter in the script for the meat. private ["_hasdog","_type","_pos","_dog","_animalID","_fsmid","_hasRmeat"]; closedialog 0; // Check if player currently has a dog _hasdog = player getVariable ["dogID", 0]; _hasRmeat = "FoodSteakRaw" in Magazines player; if (!_hasRmeat) then exitWith {cutText [format["You have no Raw Meat"], "PLAIN DOWN"];}; if (_hasdog == 0) then { _type = "DZ_Pastor"; _Pos = getPosATL player; // Create dog _dog = createAgent [_type, _Pos, [], 0, "NONE"]; PVDZE_zed_Spawn = [_dog]; publicVariableServer "PVDZE_zed_Spawn"; _animalID = [_pos,_dog] execFSM "\z\addons\dayz_code\system\animal_agent.fsm"; // Tame dog _animalID = _dog getVariable "fsm_handle"; _animalID setFSMVariable ["_isTamed", true]; _dog disableAI "FSM"; (group _dog) setBehaviour "AWARE"; _fsmid = [_dog, typeOf _dog] execFSM "\z\addons\dayz_code\system\dog_agent.fsm"; _fsmid setFSMVariable ["_handle", _fsmid]; player setVariable ["dogID", _fsmid]; _dog setVariable ["fsm_handle", _fsmid]; _dog setVariable ["CharacterID", dayz_characterID, true]; systemChat "Your dog has been spawned!"; player removeMagazine 'FoodSteakRaw'; } else { systemChat "You already have a dog!"; }; Great mod - better than the one I was using, more natural. Beans! Link to comment Share on other sites More sharing options...
FPGElliot Posted November 2, 2014 Report Share Posted November 2, 2014 Soon as you killed the dog i decided to not watch the video anymore. cheech and Proximus 2 Link to comment Share on other sites More sharing options...
lonewolfgaming Posted November 2, 2014 Report Share Posted November 2, 2014 In which file do I find the Class Item Radio to add the command? Link to comment Share on other sites More sharing options...
Proximus Posted November 2, 2014 Report Share Posted November 2, 2014 I think you need Maca's right click script for that? Link to comment Share on other sites More sharing options...
Tech_Support Posted November 3, 2014 Report Share Posted November 3, 2014 i used to play on a 1.8.0.3 server they had dogs spawn from a kennel and u tame them they gather food for u and they attacked zombies that were agro after you. Link to comment Share on other sites More sharing options...
Mig Posted November 13, 2014 Report Share Posted November 13, 2014 possible that the dog attack the zombie ? Link to comment Share on other sites More sharing options...
Logi Posted November 13, 2014 Author Report Share Posted November 13, 2014 possible that the dog attack the zombie ? It is certainly possible to create a script that would make the dog attack zombies within a certain distance. But that is not a standard feature for the dog. If I have some spare time I might add some extra features to the dog. But at the moment I am a bit busy with uni coursework. Link to comment Share on other sites More sharing options...
Proximus Posted November 13, 2014 Report Share Posted November 13, 2014 Is the spawned dog also buggy as when you tame a dog the normal way? Gone after restart, run around like a chicken without a head etc etc. Also is the dog gone again when i logout? Can i make the dog permanent (until it's killed or dismissed) I've seen movies on youtube where the guy had a tame dog and the dog even drove around with him in the car etc. Would absolutely love somthing like that! Link to comment Share on other sites More sharing options...
Logi Posted November 13, 2014 Author Report Share Posted November 13, 2014 Is the spawned dog also buggy as when you tame a dog the normal way? Gone after restart, run around like a chicken without a head etc etc. Also is the dog gone again when i logout? Can i make the dog permanent (until it's killed or dismissed) I've seen movies on youtube where the guy had a tame dog and the dog even drove around with him in the car etc. Would absolutely love somthing like that! Yeah the dog is a bit buggy. This script is just like taming a standard dog in the game. Except you spawn the dog rather than having to find one and tame it manually. The dog will be gone if you log out or get in a car ect just like normal. It would be possible to create a script to allow the dog to travel with the player in the back of a pickup truck or something like that. Link to comment Share on other sites More sharing options...
Proximus Posted November 13, 2014 Report Share Posted November 13, 2014 Would be awesome! Maybe when you have some spare time you can look at that? Link to comment Share on other sites More sharing options...
cheech Posted March 2, 2015 Report Share Posted March 2, 2015 yes, we want dogs!!! any news? Link to comment Share on other sites More sharing options...
(AOW)Recon Posted March 3, 2015 Report Share Posted March 3, 2015 by defualt the dog should already attack zombie's Link to comment Share on other sites More sharing options...
cheech Posted March 5, 2015 Report Share Posted March 5, 2015 hm, nope...but i try it again... sometimes the commands disappear, and the dog wont join a chopper, he only joins my cars. any idea how to add helicopters? and i dont find an "attack" button? Link to comment Share on other sites More sharing options...
cheech Posted March 13, 2015 Report Share Posted March 13, 2015 i got an client RPT error when spwaning a dog: Error in expression <dle"]; _handle = _this select 0; while {_watchDog && alive _dog} do { _watchDog > Error position: <_watchDog && alive _dog} do { _watchDog > Error Undefined variable in expression: _watchdog File z\addons\dayz_code\actions\dog\warn.sqf, line 15 Link to comment Share on other sites More sharing options...
CN_Ap Posted August 2, 2015 Report Share Posted August 2, 2015 nice work,But can you provide a detailed tutorial? I like your plugin very much. Link to comment Share on other sites More sharing options...
xandinfjg Posted August 4, 2015 Report Share Posted August 4, 2015 add dog attack, barking alert, climb into cars helicopters... Link to comment Share on other sites More sharing options...
chi Posted August 4, 2015 Report Share Posted August 4, 2015 Nice script! If anyone ever does have the free time, the dog would be awesome. Maybe a script to have him "Stay" and "Find animals within say 200 or 300 meters". Also, it would be awesome to have him bark when a player or zombie is within 100 meters like you said before. I have tamed dogs before and by default it seems to be hit and miss whether or not the dog is there when you get out of a vehicle. Would be awesome to have a script to make sure you didn't lose him. i wonder if there is a texture for a dog with a pack? Would be cool if he could carry a little bit of stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now