Jump to content
johnnyboy

JBOY Dog [v1.5 - updated 12/21/2018]

Recommended Posts

hahaa no I just used a generic title in there for reference.  But I'm working on a mission with the Construction Mod.  You are a non-military security force, with a dog!!!, that has to keep an eye on the workers as they build stuff.  Of course pesky rebels come by from time to time so you have to keep your workers safe!  I was trying to use the radio at the construction site so when you got close to it you would hear the music etc (its not a big necessity but it adds a nice touch i think)  By the way my favorite dog was an Alaskan malamute  named Boomer, so I love the name.  Still very new to your script, started it a few days ago, so i'm still learning as i go along, but so far its great.  Thank you so much for your efforts and the fast reply.   I will try what you suggested.

  • Like 1

Share this post


Link to post
Share on other sites

Ok I got it to work, not sure how, but I used a different layout for the Cfgsounds so here was the one that worked:

 

class CfgSounds
{
    // Definition for each sound
    class sound01
    {
        name = "sound01"; // 
        sound[] = {\music\sound01.ogg, 1, 1};
        titles[] = {0, ""};    
    };    
     #include "JBOY_Dog\Sounds\JBOY_Dog_Sounds.hpp"
    }; 
};

 

yay!  also I know i'm a pain lol but how do you spawn in the chickens etc, i've tried a few things and haven't gotten it so far.

 

thanks so much!

Share this post


Link to post
Share on other sites

@sirhc221

In the Template mission you downloaded, look in the init.sqf at some commented out code near the bottom.  Here I put code sections that you can uncomment that will create examples of:

  • Create a dog and assign it to an AI handler.  Good for a AI sentry walking his rounds with a dog.
  • Create rabbits and chickens, and run the scripts on them that make them scatter and fly when approached by dog or man.
  • Spawn a feral dog pack that will roam and attack any units or animals it gets near to.

You should clearly see  the example chicken code in there.

 

Have fun dude.  Hope to see your mission someday.

  • Like 1

Share this post


Link to post
Share on other sites

I would love too see this in MP.
And I would like to volunteer my unit to help test it if needed. 
We are a special forces unit, and a Special Forces, bomb sniffing, bad guy catching dog would fit right in.

Cheers for a cool mod

Share this post


Link to post
Share on other sites
1 hour ago, kennyleif said:

I would love too see this in MP.
And I would like to volunteer my unit to help test it if needed. 
We are a special forces unit, and a Special Forces, bomb sniffing, bad guy catching dog would fit right in.

Cheers for a cool mod

Thanks Kenny, for the compliment and offer to help.  Due to time constraints, I don't see me working on MP stuff for a few months though.  Bomb sniffing for SP will likely come sooner.

  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, johnnyboy said:

Thanks Kenny, for the compliment and offer to help.  Due to time constraints, I don't see me working on MP stuff for a few months though.  Bomb sniffing for SP will likely come sooner.

Well whatever we as a unit could do too speed that timeframe up, i'm for it. It could really give a huge new aspect to Milsim in Arma. Specially SF units.

So if there is anything we can do, just text me.

  • Like 1

Share this post


Link to post
Share on other sites

Is there a way to make Boomer, stare, point, growl, bark when an enemy comes within  a certain distance of the player..say 150m range which would also depend on wind direction.  Would be a cool aspect for guard duty etc, and also for the mine sniffing part as well.  You're out looking for mines but some sneaky bad guys are trying to stop you..but luckily Boomer is there!

Share this post


Link to post
Share on other sites
59 minutes ago, sirhc221 said:

Is there a way to make Boomer, stare, point, growl, bark when an enemy comes within  a certain distance of the player..say 150m range which would also depend on wind direction.  Would be a cool aspect for guard duty etc, and also for the mine sniffing part as well.  You're out looking for mines but some sneaky bad guys are trying to stop you..but luckily Boomer is there!

in the current release, dog senses enemies at 75M, and will stop, growl, and look in the enemies direction.  You can see an example of that in the v.1.2 Tracking and Swimming video  in first post.  It works great when moving through jungle...the dog warns you before you make contact.  It currently is not wind dependent, but I plan to add that someday.

  • Like 1

Share this post


Link to post
Share on other sites

Did not know that!  I'll take a look at the video...i knew he could track but not sense the enemy (my enemies are probably over 75m hence why i never noticed him doing it.   Good to know...thanks for the fast replies and good, dedicated work.

Share this post


Link to post
Share on other sites
1 minute ago, sirhc221 said:

Did not know that!  I'll take a look at the video...i knew he could track but not sense the enemy (my enemies are probably over 75m hence why i never noticed him doing it.   Good to know...thanks for the fast replies and good, dedicated work.

I just looked it up.  If you want to set a greater detection distance then edit the JBOY_dog_create.sqf script and modify this line:

_dog setVariable ["vEnemyDetectDistance", 75, true]; // Distance at which dog can detect an ememy 

And if you are interested in taking on the challenge of wind direction affecting detection, this would be the script to modify:

 

JBOY_DogEnemyDetectionLoop.sqf

 

I definitely plan to add that some day.  One good use case would be stealth missions where player is trying to infiltrate a camp that is patrolled by AI guards with dogs.  Wind direction would then influence player's decision on direction to approach from.

Share this post


Link to post
Share on other sites

Nice, I will play around with that for sure.  I plan to do a patrol of the construction site...(really boring like real life) but then things can change just in an instant!  You'd hear your dog growl and point and know someone is lurking about and where to investigate (i was really hoping for a 'fetch ball' option lol so you could play with the dog while you were bored..then you'd not be paying attention and then you'd be caught off guard!)  

 

Wind direction and stealth would be cool, you could really use the Kestrel in game for wind direction and that would dictate which direction you'd approach the base etc

  • Like 2

Share this post


Link to post
Share on other sites

Not that I don't like your voice, I was trying to change the voice like in the video, and haven't been able to do it yet.  I changed it from "true" to "false" and its still in your voice.  Its not really a big deal, but It bothers me that I can't find the way to change it!  I did however change the distance to 'sniff' the enemy, works great!  Adds so much more to missions.  Wind direction script...way beyond my pay grade lol but I'm still doing research on it though.

  • Like 2

Share this post


Link to post
Share on other sites

I'm glad you're having fun with this.  When creating the dog, the 4th parameter set to false will make the dog handler commands use the unit's in-game voice/language.  Example:

 _dog = [_handler, "Alsatian_Sand_F", (_handler modelToWorld [3,4,0]), false] call JBOY_dog_create;

You can also change the language to the unit's language by putting these 2 lines somewhere after dog created:

_language = [_handler, false] call JBOY_getSpeakerLanguage;
_dog setVariable ["vHandlerLanguageAbbrev", _language, true]; 

If the handler is the player, and the dog is named Dog1, then this should change player's dog commanding langage to default unit language (fre, eng, persian, whatever):

_language = [player, false] call JBOY_getSpeakerLanguage;
Dog1 setVariable ["vHandlerLanguageAbbrev", _language, true]; 

 

  • Like 2

Share this post


Link to post
Share on other sites

Hello ! I wanna thank you for your script

I was able to run it and have some fun with Boomer :) Also i found that the voice acting suits my character.

 

But I'm now facing lots of difficulties to set Jboy script into my main mission..

I'm using Ravage mod and setting my personnal scenario also I use some tpw script but I don't think their will be issues with this.

In the scenario, the character when starting the mission have different start location randomly. 

And here's my problem, if I use the different starting locations I will have the ''T'' menu also the voice commande but Boomer isn't here.

When I delete the different spawn point Boomer is ok and it work great.

 

Sorry for this post, my english isn't good enough to explain correcty, also I'm posting because I don't see where I made a mistake.

Thank you

Share this post


Link to post
Share on other sites

Hi @MisterOth, thanks for giving Boomer some exercise!  And Happy Thanksgiving to you!  (American holiday).

 

I am unfamiliar with Ravage and TPW, so can't help you with that.  I'm guessing that the spawn script is creating the player (and the dog if you put the call to the dog create script there).  Then the spawn script uses setPos to move the player to the random start position.  Right after the spawn script moves the player, add a line to move the dog to the player's position like this:

dog1 setpos (player modelToWorld [2,2,0]); // Change "dog1" to the whatever you named the dog object

You can use the console in the editor to confirm the dog exists by setPos-ing player to the position of the dog.

 

If you still have trouble, post the player spawn code so I can see what is happening.

 

Share this post


Link to post
Share on other sites
46 minutes ago, johnnyboy said:

Hi @MisterOth, thanks for giving Boomer some exercise!  And Happy Thanksgiving to you!  (American holiday).

 

I am unfamiliar with Ravage and TPW, so can't help you with that.  I'm guessing that the spawn script is creating the player (and the dog if you put the call to the dog create script there).  Then the spawn script uses setPos to move the player to the random start position.  Right after the spawn script moves the player, add a line to move the dog to the player's position like this:


dog1 setpos (player modelToWorld [2,2,0]); // Change "dog1" to the whatever you named the dog object

You can use the console in the editor to confirm the dog exists by setPos-ing player to the position of the dog.

 

If you still have trouble, post the player spawn code so I can see what is happening.

 

Thank you for responding. And Happy Holiday in your contry and with your family.
I will do my best to see. I'm new to script and learning every day. Thanks, if I have big issues I will post then :)

  • Like 1

Share this post


Link to post
Share on other sites

Greetings JB!

 

Been a tough few months, still missing my best buddy and it doesn't get any easier.....that's why this has become more than "just another script", it provides me with a little light therapy and comfort in my downtime....but enough of my RL fragilities, I could use a little help....

The mission would require the player to start out on his own but "join forces" with Boomer later in the mission, like at a predefined position....is this at all possible? 

 

Oh and by the way, Boomer loves the open seas...

ysT4Ez9.jpg 

  • Like 6

Share this post


Link to post
Share on other sites
2 hours ago, Evil Organ said:

Greetings JB!

 

.... I could use a little help....

The mission would require the player to start out on his own but "join forces" with Boomer later in the mission, like at a predefined position....is this at all possible? 

 

 

Very much so....I have a WIP mission which JB knows very well (one of those never finished....hahahaha...) where I had Boomer delivered by paradrop in a crate..LOL...Let me dig in the editor and report back how I did it....

 

Share this post


Link to post
Share on other sites
14 minutes ago, zagor64bz said:

Very much so....I have a WIP mission which JB knows very well (one of those never finished....hahahaha...) where I had Boomer delivered by paradrop in a crate..LOL...Let me dig in the editor and report back how I did it....

 

Thanks man!....that gives me just enough time to ring PETA. :razz:

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, Evil Organ said:

 

Thanks man!....that gives me just enough time to ring PETA. :razz:

Ok..here we go:

 

...I have an object (a crate in this case) with an Addaction 

paradog = cargo addAction ["<t color='#FF0000'>GET SPECIAL SUPPLY</t>", "createdog.sqf",[],3,true,true,"","",5];
///createdog.sqf///

dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [TL1, "Fin_tricolour_F", (TL1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, TL1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
///nul = [dog1, TL1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'heel', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.
cargo removeAction paradog;
"BATTLE BUDDY" hintC ["You have a buddy now..his name is BOOMER","He's a well trained combat-dog..he can help you in your mission","Use the ''T'' key to issue commands","Look in the briefing for usage instructions"];
0 = [] execVM "dogmarker.sqf";

ps:dogmarker.sqf just add a marker to track boomer if you lose track of him.

Spoiler

params ["_unit"];

sleep 0.2;



_HQLogicGrp = createGroup sideLogic;
_hqObject = _HQLogicGrp createUnit [
    "Logic",
    [0,0,0],
    [],
    0,
    "NONE"
];

_nikPos = ([(getPosWorld dog1),1] call CBA_fnc_Randpos);


_m = createMarker ["DogMarker", _nikPos];
_m setMarkerType "b_recon";
_m setMarkerBrush "SOLID";
_m setMarkerAlpha 1;


while {true} do
{
"DogMarker" setmarkerpos (getpos dog1);
}; 

 

 

 

together with the JB dog folder:

in description.ext

Spoiler

	
	#include "JBOY_Dog\Dialog\Common.hpp"
	#include "JBOY_Dog\Dialog\JBOY_gui_Dog.hpp"

class RscTitles
{
	#include "JBOY_Dog\Dialog\Common.hpp"
	#include "JBOY_Dog\Dialog\JBOY_gui_Dog.hpp"
};

class CfgSounds
{	
	class boomerFind
	{
		name = "boomerFind"; 
		sound[] = {\JBOY_Dog\Sounds\boomerFind.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngFind
	{
		name = "EngFind"; 
		sound[] = {\JBOY_Dog\Sounds\EngFind.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreFind
	{
		name = "FreFind"; 
		sound[] = {\JBOY_Dog\Sounds\FreFind.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerFind
	{
		name = "PerFind"; 
		sound[] = {\JBOY_Dog\Sounds\PerFind.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiFind
	{
		name = "ChiFind"; 
		sound[] = {\JBOY_Dog\Sounds\ChiFind.ogg, 1, 1.0};
		titles[] = {0, ""};
    };
    class boomerTrack
	{
		name = "boomerTrack"; 
		sound[] = {\JBOY_Dog\Sounds\boomerTrack.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngTrack
	{
		name = "EngTrack"; 
		sound[] = {\JBOY_Dog\Sounds\EngTrack.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreTrack
	{
		name = "FreTrack"; 
		sound[] = {\JBOY_Dog\Sounds\FreTrack.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerTrack
	{
		name = "PerTrack"; 
		sound[] = {\JBOY_Dog\Sounds\PerTrack.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiTrack
	{
		name = "ChiTrack"; 
		sound[] = {\JBOY_Dog\Sounds\ChiTrack.ogg, 1, 1.0};
		titles[] = {0, ""};
    };
	class boomerDetain
	{
		name = "boomerDetain"; 
		sound[] = {\JBOY_Dog\Sounds\boomerDetain.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngDetain
	{
		name = "EngDetain"; 
		sound[] = {\JBOY_Dog\Sounds\EngDetain.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreDetain
	{
		name = "FreDetain"; 
		sound[] = {\JBOY_Dog\Sounds\FreDetain.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerDetain
	{
		name = "PerDetain"; 
		sound[] = {\JBOY_Dog\Sounds\PerDetain.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiDetain
	{
		name = "ChiDetain"; 
		sound[] = {\JBOY_Dog\Sounds\ChiDetain.ogg, 1, 1.0};
		titles[] = {0, ""};
    };
    class boomerStay
	{
		name = "boomerStay"; 
		sound[] = {\JBOY_Dog\Sounds\boomerStay.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngStay
	{
		name = "EngStay"; 
		sound[] = {\JBOY_Dog\Sounds\EngStay.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreStay
	{
		name = "FreStay"; 
		sound[] = {\JBOY_Dog\Sounds\FreStay.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerStay
	{
		name = "PerStay"; 
		sound[] = {\JBOY_Dog\Sounds\PerStay.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiStay
	{
		name = "ChiStay"; 
		sound[] = {\JBOY_Dog\Sounds\ChiStay.ogg, 1, 1.0};
		titles[] = {0, ""};
    };
    class boomerDropIt
	{
		name = "boomerDropIt"; 
		sound[] = {\JBOY_Dog\Sounds\boomerDropIt.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngDropIt
	{
		name = "EngDropIt"; 
		sound[] = {\JBOY_Dog\Sounds\EngDropIt.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreDropIt
	{
		name = "FreDropIt"; 
		sound[] = {\JBOY_Dog\Sounds\FreDropIt.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerDropIt
	{
		name = "PerDropIt"; 
		sound[] = {\JBOY_Dog\Sounds\PerDropIt.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiDropIt
	{
		name = "ChiDropIt"; 
		sound[] = {\JBOY_Dog\Sounds\ChiDropIt.ogg, 1, 1.0};
		titles[] = {0, ""};
	};	
    class boomerFetch
	{
		name = "boomerFetch"; 
		sound[] = {\JBOY_Dog\Sounds\boomerFetch.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class EngFetch
	{
		name = "EngFetch"; 
		sound[] = {\JBOY_Dog\Sounds\EngFetch.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class FreFetch
	{
		name = "FreFetch"; 
		sound[] = {\JBOY_Dog\Sounds\FreFetch.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class PerFetch
	{
		name = "PerFetch"; 
		sound[] = {\JBOY_Dog\Sounds\PerFetch.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class ChiFetch
	{
		name = "ChiFetch"; 
		sound[] = {\JBOY_Dog\Sounds\ChiFetch.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerYelp
	{
		name = "boomerYelp"; 
		sound[] = {\JBOY_Dog\Sounds\boomerYelp.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerYelp2
	{
		name = "boomerYelp2"; 
		sound[] = {\JBOY_Dog\Sounds\boomerYelp2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class whimper1
	{
		name = "whimper1"; 
		sound[] = {\JBOY_Dog\Sounds\whimper1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class barkGrowlbark
	{
		name = "barkGrowlbark"; 
		sound[] = {\JBOY_Dog\Sounds\barkGrowlbark.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class growlLong
	{
		name = "growlLong"; 
		sound[] = {\JBOY_Dog\Sounds\growlLong.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerHeel
	{
		name = "boomerHeel"; 
		sound[] = {\JBOY_Dog\Sounds\boomerHeel.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerAtEase
	{
		name = "boomerAtEase"; 
		sound[] = {\JBOY_Dog\Sounds\boomerAtEase.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerWoof1
	{
		name = "boomerWoof1"; 
		sound[] = {\JBOY_Dog\Sounds\boomerWoof1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerStop
	{
		name = "boomerStop"; 
		sound[] = {\JBOY_Dog\Sounds\boomerStop.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerSit
	{
		name = "boomerSit"; 
		sound[] = {\JBOY_Dog\Sounds\boomerSit.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerSitrep
	{
		name = "boomerSitrep"; 
		sound[] = {\JBOY_Dog\Sounds\boomerSitrep.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerAttack
	{
		name = "boomerAttack"; 
		sound[] = {\JBOY_Dog\Sounds\boomerAttack.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGuard
	{
		name = "boomerGuard"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGuard.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGetIn
	{
		name = "boomerGetIn"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGetIn.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGetOut
	{
		name = "boomerGetOut"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGetOut.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGuard2
	{
		name = "boomerGuard2"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGuard2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGuardThisJoker
	{
		name = "boomerGuardThisJoker"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGuardThisJoker.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerGuardThisPrick
	{
		name = "boomerGuardThisPrick"; 
		sound[] = {\JBOY_Dog\Sounds\boomerGuardThisPrick.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerScout
	{
		name = "boomerScout"; 
		sound[] = {\JBOY_Dog\Sounds\boomerScout.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class boomerMoveThere
	{
		name = "boomerMoveThere"; 
		sound[] = {\JBOY_Dog\Sounds\boomerMoveThere.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class goodBoy
	{
		name = "goodBoy"; 
		sound[] = {\JBOY_Dog\Sounds\goodBoy.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class goodDog
	{
		name = "goodDog"; 
		sound[] = {\JBOY_Dog\Sounds\goodDog.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class baa1
	{
		name = "baa1"; 
		sound[] = {\Sounds\baa1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class baa2
	{
		name = "baa2"; 
		sound[] = {\Sounds\baa2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class baa4
	{
		name = "baa4"; 
		sound[] = {\Sounds\baa4.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class baa5
	{
		name = "baa5"; 
		sound[] = {\Sounds\baa5.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class baa6
	{
		name = "baa6"; 
		sound[] = {\Sounds\baa6.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class bark2
	{
		name = "bark2"; 
		sound[] = {\JBOY_Dog\Sounds\bark2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class barkmean2
	{
		name = "barkmean2"; 
		sound[] = {\JBOY_Dog\Sounds\barkmean2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class growls3
	{
		name = "growls3"; 
		sound[] = {\JBOY_Dog\Sounds\growls3.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class barkmean3
	{
		name = "barkmean3"; 
		sound[] = {\JBOY_Dog\Sounds\barkmean3.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class barkmean1
	{
		name = "barkmean1"; 
		sound[] = {\JBOY_Dog\Sounds\barkmean1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class bark1
	{
		name = "bark1"; 
		sound[] = {\JBOY_Dog\Sounds\bark1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dog_growl_vicious
	{
		name = "dog_growl_vicious"; 
		sound[] = {\JBOY_Dog\Sounds\dog_growl_vicious.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dog_howl
	{
		name = "dog_howl"; 
		sound[] = {\JBOY_Dog\Sounds\dog_howl.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dogPant1
	{
		name = "dogPant1"; 
		sound[] = {\JBOY_Dog\Sounds\dogPant1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dogPant2
	{
		name = "dogPant1"; 
		sound[] = {\JBOY_Dog\Sounds\dogPant1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dogSniff1
	{
		name = "dogSniff1"; 
		sound[] = {\JBOY_Dog\Sounds\dogSniff1.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
	class dogSniff2
	{
		name = "dogSniff2"; 
		sound[] = {\JBOY_Dog\Sounds\dogSniff2.ogg, 1, 1.0};
		titles[] = {0, ""};
	};
};

 

init

Spoiler

//if(7!isServer) then {waitUntil{!isNull player}};
//AZC_fnc_Delete			= compile preprocessFileLineNumbers "JBOY_Dog\fnc_Delete.sqf";
JBOY_say3d =              compile preprocessFileLineNumbers "JBOY_Dog\JBOY_say3d.sqf";
JBOY_dog_create =         compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dog_create.sqf";
JBOY_getSpeakerLanguage = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getSpeakerLanguage.sqf";
JBOY_getDogPOSPerVeh =    compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getDogPOSPerVeh.sqf";
JBOY_watchNextWP =        compile preprocessFileLineNumbers "JBOY_Dog\JBOY_watchNextWP.sqf";
JBOY_isFetchable =        compile preprocessFileLineNumbers "JBOY_Dog\JBOY_isFetchable.sqf";
JBOY_dogPackCreate =      compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dogPackCreate.sqf";
JBOY_dogPackLoop =        compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dogPackLoop.sqf";
JBOY_dogExecuteAction =   compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dogExecuteAction.sqf";
//CALC_INTERMEDIATE_POS   = compile preprocessFileLineNumbers "JBOY_Dog\CALC_INTERMEDIATE_POS.sqf";
JBOY_dogPackMemberAttack= compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dogPackMemberAttack.sqf";
JBOY_getNearTargets     = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getNearTargets.sqf";
JBOY_getClosestObjFromArray       = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getClosestObjFromArray.sqf";
JBOY_getTargetDesignatedByHandler = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getTargetDesignatedByHandler.sqf";
_dogDialog = [] spawn compile PreprocessFileLineNumbers "JBOY_Dog\Dialog\JBOY_fnc_DogDialog.sqf";
//JBOY_fnc_DogDialog = [] spawn compile PreprocessFileLineNumbers "Dialog\JBOY_fnc_DogDialog.sqf";

// New scritps added for Tracking
JBOY_dogPreyInit = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_dogPreyInit.sqf";
JBOY_DogScentDropLoop = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogScentDropLoop.sqf";
JBOY_getFreshestScentMarker = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getFreshestScentMarker.sqf";
JBOY_DogScentDetectionLoop = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogScentDetectionLoop.sqf";
JBOY_DogSmashGrassLoop = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogSmashGrassLoop.sqf";
JBOY_getNearEnemies = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_getNearEnemies.sqf";
JBOY_DogScentDeleteOlderScent = compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogScentDeleteOlderScent.sqf";


//if jip player and not server then exit
_JIPplayer = not isServer && isNull player;
if (_JIPplayer) exitwith {};
// **************************************************************************
// Enable hints and chats for debugging, and places yellow sphere above dog pack leader
// **************************************************************************
JBOY_DEBUG = True;
JBOY_preyArray = [];

// **************************************************************************
// Create game logic used by JBOY_AIFightsDogs.sqf to force AI to fire weapons.
// **************************************************************************
JBOYDogLogicCenter = createCenter sideLogic;
JBOYDogLogicGroup = createGroup JBOYDogLogicCenter;
JBOYDogGameLogic = JBOYDogLogicGroup createUnit ["Logic", [0,0,0], [], 0, "NONE"];

// **************************************************************************
// Create dog and have him follow player
// **************************************************************************
///_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
///dog1 = [TL1, "Fin_tricolour_F", (TL1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
///nul = [dog1, TL1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
///nul = [dog1, TL1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
///_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'heel', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.
// **************************************************************************
// Start Trail Detection for dog1
// **************************************************************************
dog1 setVariable ["vScentTrailDetectionOn", true, true]; // Must set this property true if you want dog to track a trail of scentMarkers.
_dmy = [] spawn {sleep 1; _d=[dog1] call JBOY_DogScentDetectionLoop;};

// **************************************************************************
// Start dropping scent markers for leader of group to be tracked.  
// quarry1 is a unit that starts near vehicles on the beach, and  follows move waypoints dropping a trail.
// **************************************************************************
_dmy = [quarry1] spawn {params["_prey"];sleep 2; preyObject1=[_prey] call JBOY_dogPreyInit;}; 
// **************************************************************************
// Loop that smashes down grass as dude walks along.  Only good for 90 seconds until grass pops up again.
// In the future, may have better solution that continually smashes grass trail for player to follow.
// **************************************************************************
_dmy = [] spawn {sleep 1; _d=[quarry1] call JBOY_DogSmashGrassLoop;};

 

TL1 is the name of player/handler.

  • Like 1

Share this post


Link to post
Share on other sites

@Evil Organ Hey buddy, thanks for the screenshot...always great to see Boom enjoying life.

 

You can create a dog without a handler (first parameter objnul):

// First parameter objNull means dog is created without a handler assigned.
_dog = [objnull, "Fin_tricolour_F", (Valdez modelToWorld [2,2,0]), true] call JBOY_dog_create;  

 

And later in your mission, assign the dog to a handler, and start the command script:

_dog setVariable ["vHandler", _handler , true];  // assign dog to handler
_handler setVariable ["vDog", _dog, true];       // assign hnadler to dog

nul = [_dog, _handler, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // start command listener on dog.

Dog might wander away while playing his default agent animations, so you might want to disableai "ANIM" on him until player is near him (before player takes control).

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
22 minutes ago, johnnyboy said:

@Evil Organ Hey buddy, thanks for the screenshot...always great to see Boom enjoying life.

 

You can create a dog without a handler (first parameter objnul):


// First parameter objNull means dog is created without a handler assigned.
_dog = [objnull, "Fin_tricolour_F", (Valdez modelToWorld [2,2,0]), true] call JBOY_dog_create;  

 

And later in your mission, assign the dog to a handler, and start the command script:


_dog setVariable ["vHandler", _handler , true];  // assign dog to handler
_handler setVariable ["vDog", _dog, true];       // assign hnadler to dog

nul = [_dog, _handler, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // start command listener on dog.

Dog might wander away while playing his default agent animations, so you might want to disableai "ANIM" on him until player is near him (before player takes control).

Damn...wasn't that simpler?..Hahahahahaha..YOU'RE the MAN JB!!!!

Share this post


Link to post
Share on other sites

Hi all! 

I'm tired of it 5 days I try and can not ... On my computer the script works really well and no problems. I'm trying to open a K-9 unit on my server And the script just does not work

 

I Make PBO Mission And upload to my Box VPS (windows server) 

Cant see the dog cant give COmmands Cant see the Commands for dog

 

Who can help me ?

please

 

Share this post


Link to post
Share on other sites

Any progress on MP tried it on our dedicated server & no menu comes up when you press T. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×