aussie battler

John Dogs - Spawn Companion Dog from your XM8

35 posts in this topic

John Dogs for Arma3 Exile: made by JohnO

 

About @John

  • JohnO created this script and many others for Arma3 Exile. Unfortunately JohnO left Exile but was kind enough to let me release the script again. Some of JohnO's work includes Exile Reborn, Weather Script, Travelling Traders, Air Drops and Mission Events.

Description:

  • Spawn an ai dog from your XM8 and command it.

How it works:

  • Deploy a dog from your Xm8 using x1 beef parts. Scroll on the spawned dog with another set of beef parts & choose "Tame Animal". The dog can now be commanded.

Rules:

  • Can't deploy the dog in a safe zone (you have to set the safe zones up in the file JohnO_fnc_following.sqf).
  • You can only have one dog per restart.

Install: https://github.com/aussie-battler/John-Dogs/

Install Instructions: John Dogs from your XM8.

  1. Install ExAd by @Janski https://goo.gl/VBxFFa

  2. Drop the DeployVehicle folder into your.mission\ExAdClient\XM8\Apps\DeployVehicle

  3. Drop the Deploy Vehicle server file in your @ExileServer/addons/exad_dv.pbo

  4. In config.cpp search for class CFGXM8

Add the following to extraApps[] = { };

"ExAd_Dog"

The line should now read:

Spoiler

extraApps[] = {"ExAd_Dog"};

 

  1. Underneath the extraApps line add:

 

Spoiler

 


class CfgXM8

{
	extraApps[] = {"ExAd_Dog"}; 
	
	class ExAd_Dog
	{
		title = "Attack Dog: x2 Beef Parts needed";
		config = "ExAdClient\XM8\Apps\DeployVehicle\dog_config.sqf";
		logo = "ExAdClient\XM8\Apps\DeployVehicle\dog.paa";
		bambiState = 0;
		vehicleClass = "Alsatian_Black_F";
		recipe[] = {{"Exile_Item_Dogfood",1}};
		packable = 0;
		autoCleanUp = 0;
		quickFunction = "['ExAd_Dog'] call ExAd_XM8_DV_fnc_spawnVehicle";
	};
}; 

 

Spoiler

class XM8_App01_Button: RscExileXM8AppButton1x1
{
    textureNoShortcut = "ExAdClient\XM8\Apps\DeployVehicle\dog.paa";
    text = "Attack Dog: x2 Dog Food needed";
    onButtonClick = "['ExAd_Dog'] call ExAd_XM8_DV_fnc_spawnVehicle";
    resource = "";
};

(change XM8_App01_Button to the app number that is spare eg. "XM8_App01_Button" "XM8_App02_Button" "XM8_App03_Button" )

  1. Add this line to your config.cpp file Custom Code Section:

 

Spoiler

 


class CfgExileCustomCode 
{
	//JohnO Dogs
	ExileClient_object_player_initialize = "custom\dogs\ExileClient_object_player_initialize.sqf";
};

 


Now drop the "custom" folder into your.mission.pbo

  1. Add this line in your description.ext file:

 

Spoiler

	class CfgSounds
	{
		#include "custom\dogs\sounds\defines.hpp"
	};

 


  • note that if you already have class CfgSounds in the description.ext just add the line below to your CfgSounds:
Spoiler

#include "custom\dogs\sounds\defines.hpp"

  1. Add these lines to your init.sqf:
Spoiler

 


BURK_dogSeek = compileFinal preprocessFileLineNumbers "custom\dogs\JohnO_fnc_seeking.sqf"; 
BURK_dogFollowPlayer = compileFinal preprocessFileLineNumbers "custom\dogs\JohnO_fnc_following.sqf"; 

 

 

 

9. Now change the price of the dog, x2 beef parts are needed. In config.cpp search for BeefParts and change the line to:

Spoiler

class Exile_Item_BeefParts { quality = 1; price = 10000; sellPrice = 14;}; // change the buy/sell price to whatever suits.

Infistar Settings: Add "Craft Vehicle" to the allowedActions section:

Spoiler

allowedActions[] = {"Break free","Use AutoLockPicker","Craft Vehicle","Hack UAV"};

 

Future Requests (please help):

  • The dog will attack other players, but only the owner can hear the dog bark & the player scream. I would love for the sounds to be global. Here is the code currently being used:
Spoiler

[BURK_dog,_actualTarget] say3d "barkmean1";

  • I can get the dog into a vehicle, but can't get it back out. Here is the code currently being used:

 

Spoiler

 


//start get in vehicle


inVehicle = false;


inVehicleCheck = 
{
	if !(inVehicle) then // if false check if in vehicle
	{	
		if (vehicle player != player) then // if in vehicle
		{
			inVehicle = true;
			
			_vehicleObject = vehicle player;
			BURK_dog attachTo [_vehicleObject, [0.00683594,-1.80609,-1.31031]];  
			player removeAction Dogfollow;
			player removeAction dogseek;
			player removeAction Dogpassive;
			player removeAction Dogstay;
			player removeAction Dogrun;
			player removeAction Dogsprint;
			player removeAction agressiveAction;
			player removeAction passiveAction;

			BURK_dogFollowing = false;
			BURK_dogSeeking = false;

		}
		else // run this when player gets out of vehicle..
		{
			if (inVehicle) then //only recreate the dog if inVehicle was set true
			{	
				inVehicle = false; // set it to false to check again
				//BURK_dog setpos [getpos BURK_dog select 0,getpos BURK_dog select 5,0];
				
				//detach BURK_dog;
				deleteVehicle BURK_dog;
				//BURK_dog setpos [((getpos player) select 0) + 2,((getpos player) select 1) + 2,0];
				BURK_dog = createAgent ["Alsatian_Black_F", getPos player, [], 5, "CAN_COLLIDE"];

				BURK_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];

				[] execVM "custom\dogs\JohnO_fnc_dogFollow.sqf";
			};
		};
	};
};

[5, inVehicleCheck, [], true] call ExileClient_system_thread_addtask;

//end get in vehicle   **/

 

 

20180105225703_1.jpg

20180105215828_1.jpg

Edited by aussie battler
  • Like 9

Share this post


Link to post
Share on other sites
Advertisement

@geekm0nkey Seems like a character creation problem in your database. Have you tried a logging in to the same server with a clean mission file (without your edits). See if you are still a bird.

If you are, I would delete yourself from the "player" section of the database. If that doesn't work & you don't care about your character, delete yourself in the "accounts" section of the database. All flags, containers, safes, baseparts & vehicles that you own will get wiped.

Share this post


Link to post
Share on other sites

Hi guys, we have this set up and it works a treat, however we also have deploy crate set up using almost the same method vis exad and when we spawn a crate it tells us our dog has been spawned and we need to feed it,

http://exile.majormittens.co.uk/topic/24021-exad-addon-spawn-exile-supply-crate/

any ideas on how to get them playing nice together and display the right message for the right item?

my config in case it helps:

Spoiler

class CfgXM8
{
 extraApps[] = {"ExAd_VG","Supply_Box","Rubber_Boat","ExAd_Dog"};
 
 class ExAd_VG
 {
  title = "Virtual Garage";
  controlID = 50000;     //IDC:50000 -> 50015 || These need to be unique and out of range from each other
  logo = "ExadClient\XM8\Apps\VG\Icon_VG.paa";
  onLoad = "ExAdClient\XM8\Apps\VG\onLoad.sqf";
  onOpen = "ExAdClient\XM8\Apps\VG\onOpen.sqf";
  onClose = "ExAdClient\XM8\Apps\VG\onClose.sqf";
 }; 
 class Supply_Box
    {
        title = "Deploy Crate";
  config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf";
        bambiState = 0;
        vehicleClass = "Exile_Container_SupplyBox";
        recipe[] = {{"Exile_Item_WoodPlank",2}};
        packable = 1;
        quickFunction = "['Supply_Box'] call ExAd_XM8_DV_fnc_spawnVehicle";
    };
 class Rubber_Boat
    {
        title = "Deploy Rubber Boat";
  config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf";
        bambiState = 0;
        vehicleClass = "Exile_Boat_RubberDuck_Orange";
        recipe[] = {{"Exile_Item_DuctTape",4}};
        packable = 1;
        quickFunction = "['Rubber_Boat'] call ExAd_XM8_DV_fnc_spawnVehicle";
    };
 class ExAd_Dog
 {
  title = "Pet Dog: x2 Beef Parts needed";
  config = "ExAdClient\XM8\Apps\DeployVehicle\dog_config.sqf";
  logo = "ExAdClient\XM8\Apps\DeployVehicle\dog.paa";
  bambiState = 0;
  vehicleClass = "Alsatian_Black_F";
  recipe[] = {{"Exile_Item_BeefParts",1}};
  packable = 0;
  autoCleanUp = 0;
  quickFunction = "['ExAd_Dog'] call ExAd_XM8_DV_fnc_spawnVehicle";
 };

many thanks

Edited by wilderness

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.