Jump to content
johnnyboy

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

Recommended Posts

7 minutes ago, johnnyboy said:

@Vandeanson I keep seeing the black and white dog.  I'm guessing you want random dog types for your spawns.  Here's how to do it:


    _randomDog = selectRandom ["Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Alsatian_Sand_F","Alsatian_Black_F","Alsatian_Sandblack_F"];
    _dog = [_handler, _randomDog, (_handler modelToWorld [3,4,0]), false] call JBOY_dog_create; 

 

 

whats wrong with Wattebäusche?!

 

thanks, i am all about randomized scripts;)

might play around with the aggro range too.. eg. 30 + random 30 or so

  • Like 1

Share this post


Link to post
Share on other sites
24 minutes ago, Vandeanson said:

might play around with the aggro range too.. eg. 30 + random 30 or so

Good idea.  Default of 70 meters is way too far for camps IMO.  Player could never get anywhere near it.  Eventually I should make wind direction and rain affect detection, but who knows when/if I will ever get around to that.

Share this post


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

Good idea.  Default of 70 meters is way too far for camps IMO.  Player could never get anywhere near it.  Eventually I should make wind direction and rain affect detection, but who knows when/if I will ever get around to that.

 

haha i was about to suggest that (wind, rain is even better). but indeed - my to do list is piling up too:)

Share this post


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

Good idea.  Default of 70 meters is way too far for camps IMO.  Player could never get anywhere near it.  Eventually I should make wind direction and rain affect detection, but who knows when/if I will ever get around to that.

 

That's a feature in RDR 2 when hunting :)

I think Mythbusters did an episode showing that male guard dogs loved the odor of female dog urine (the non-explosive kind), so if you want to get past them you douse yourself in it. Not to give you any weird ideas for part 3.

  • Like 1
  • Haha 2

Share this post


Link to post
Share on other sites
25 minutes ago, AZCoder said:

I think Mythbusters did an episode showing that male guard dogs loved the odor of female dog urine (the non-explosive kind), so if you want to get past them you douse yourself in it. Not to give you any weird ideas for part 3.

  :suspect:

  • Like 1

Share this post


Link to post
Share on other sites
On 11/8/2018 at 2:30 PM, Vandeanson said:

I am doing something wrong , I do not see any commands

Hey VD.  I think the command menu problem  (showing dashes with no text) is probably caused by you not having the stringtable.xml file in the main mission directory.  The code is looking for translated language strings to put in the menu and not finding them.  Take a look.  Thanks.

  • Like 1

Share this post


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

Hey VD.  I think the command menu problem  (showing dashes with no text) is probably caused by you not having the stringtable.xml file in the main mission directory.  The code is looking for translated language strings to put in the menu and not finding them.  Take a look.  Thanks.

oh yep that was missing indeed, cant test right now but it was a theory of mine as well. will check again and confirm, thanks for looking into it:)

 

  • Like 2

Share this post


Link to post
Share on other sites

@johnnyboy

hiho mate,

 

General question here... i d like to enable dynamic simulation (add them to the BIS dyn. sim. system) for your dogs and cant figure out how to refer to them within the spawner scripts. i tried _dog and _dmy but that didnt work. i feel like i am overseeing something stupid:) any ideas?

Share this post


Link to post
Share on other sites
Just now, Vandeanson said:

how to refer to them within the spawner scripts.

I'm not familiar with the spawner scripts.  But when you create a dog, the object is returned to a variable (local or global if you name him specifically).  How you refer to that object elsewhere is then up to you.  You could use namespace variables.  I believe a namespace variable for the dog is created for the unit that handles the dog, so you could refer to him via the unit that handles the dog.  The dog is just an object ultimately , so why is it different than referring to a spawned AI or a spawned vehicle?

Share this post


Link to post
Share on other sites
Just now, johnnyboy said:

I'm not familiar with the spawner scripts.  But when you create a dog, the object is returned to a variable (local or global if you name him specifically).  How you refer to that object elsewhere is then up to you.  You could use namespace variables.  I believe a namespace variable for the dog is created for the unit that handles the dog, so you could refer to him via the unit that handles the dog.  The dog is just an object ultimately , so why is it different than referring to a spawned AI or a spawned vehicle?

makes sense, i ll take a closer look again;)

Share this post


Link to post
Share on other sites

Version 1.5 Update...Doggy Cam by AZCoder!

 

Hi everybody, thanks to @AZCoder, JBOY Dog now has a doggy cam option! 

 

Change Log:

  • Added option to have Doggy Cam display (PIP)
  • Stopped continuous pain yelping for AI controlled dogs and dog pack dogs.  It makes sense for player controlled dogs, because that cues player to heal the dog.  But it is annoying for dog packs and AI controlled dogs.  Thanks to @CHICKENLICKEN for reporting the issue.
  • Made dog pack dogs and AI controlled dogs easier to kill.

 

You can get this latest version 1.5 here on dropbox:  https://www.dropbox.com/s/gve13fkuzk8j9p4/JBOY_DogV1_5BasicTemplateMission.Tanoa.zip?dl=0

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

YOU GUYS ARE AWESOME!!!!!

Congratulation on the added features and to AZCoder..

 

Now...... it's Christmas..so let me be greedy:  

"..dear Santa, I've been a VERY good boy, so can I have a tactical vest for Boomer, SF style?..":don12:

 

LOL..MARY CHRISTMAS TO ALL!!!

  • Like 1
  • Haha 2

Share this post


Link to post
Share on other sites
6 hours ago, zagor64bz said:

YOU GUYS ARE AWESOME!!!!!

Congratulation on the added features and to AZCoder..

 

Now...... it's Christmas..so let me be greedy:  

"..dear Santa, I've been a VERY good boy, so can I have a tactical vest for Boomer, SF style?..":don12:

 

LOL..MARY CHRISTMAS TO ALL!!!

Pffft, I've been asking since last Xmas for a vest.

  • Haha 2

Share this post


Link to post
Share on other sites

hi, my name is chris. i've been trying to get in touch with you about your jboy dog script, primarily  "training"- making the dog load into the helicopter. i would highly appreciate if you could teach or if it sounds not appealing....... i am willing to pay for a blank mission with the availability to load boomer in the helicopter of the unit's helicopters, and vehicles i use.

it already loads into the m9 hummingbird i think due to it being another hummingbird. But i want to see it in the helicopter in my unit.the helicopter is a BEll 412, the name of the helicopter is BWRU_CH146_GRIFFON_F and it say boomer is not trained to get in the helicopter. Please contact me at Chrisfactor1 on steam usa New Bedford MA, the picture is of a soldier in the shadows and it says peace on the side in white. or contact me at lilred420430@gmail.com..... please title subject to JBOY HELLO!. PLEASE 

Share this post


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

making the dog load into the helicopter.

Hi Chris.  See this post: 

In this post I explain the two scripts you have to modify to add more vehicles for the dog to ride in.  You will define the relative attachTo position in the vehicle where the dog will be placed.  You need to experiment in editor and tweak that position until the dog looks good (i.e., is not clipping through seats, floor, walls, etc.

 

Good luck!

  • Like 1

Share this post


Link to post
Share on other sites

Here's a small fix to an immersion problem kindly reported by @MuRaZorWitchKING.  When player nears a dog pack he sees a silly sidechat message:  "Independent:  Woof!  Grrrrrrrr!".  To remove this message, make the following one line change.

 

In this script:       \JBOY_Dog\JBOY_dogPackLoop.sqf
  

Change  Line 84 from:
                    dummy= [_packLeader, 0, _sfx,"Woof!  Grrrrrrr!"] execVM "JBOY_Dog\delaySay.sqf";
 
 Change to:
                     dummy= [_packLeader, 0, _sfx,""] execVM "JBOY_Dog\delaySay.sqf";

 

I'm not bothering with a JBOY Dog new version release for this small change.  But it will be incorporated in whenever the next release happens.

  • Like 1
  • Thanks 2

Share this post


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

dummy= [_packLeader, 0, _sfx,""] execVM "JBOY_Dog\delaySay.sqf";

Oops i //'ed this out fully, what does it do? 

 

And thanks to you two! 

  • Like 1

Share this post


Link to post
Share on other sites

it plays a bark or growl sound from the pack leader.

  • Like 1

Share this post


Link to post
Share on other sites

Hello JohnnyBoy!

 

I am currently working on an ultra simple MP compatible dog patrol script and I was wondering if you could help me with the last bits of it.

 

The dogs spawn, join the owner's group, bark at enemies and attack them when close but it is the movement what I cannot get right. 

 

It seems that nothing found here: https://community.bistudio.com/wiki/Arma_3_Animals:_Override_Default_Animal_Behaviour_Via_Script

 

or Shown here: 

 

 

Works anymore.... 😓

 

Anyways, here is the script:

 

Spoiler

 


// On unit's Init field: null = [this,"Alsatian_Random_F",1] execVM "scripts\dogPatrol.sqf";

if (!isServer) exitWith {};
params ["_dogOwner", "_dogBreed", "_dogsAmount"];

_dogOwner = _this select 0;
_dogBreed = _this select 1;
_dogsAmount = _this select 2;

_dogSide = side _dogOwner;
_dogGrp = creategroup _dogSide;

for "_i" from 1 to _dogsAmount do {

_chosenBreed = "Alsatian_Random_F";

switch (_dogBreed) do {
	case "Alsatian_Random_F":
	{
	_chosenBreed = "Alsatian_Random_F";
	};
	case "Fin_random_F":
	{
	_chosenBreed = "Fin_random_F";
	};
	default 
	{ 
	_chosenBreed = "Fin_random_F";
	};
};
/*
_dogName = format ["k9%1",round (random 1000)];
call compile format ['"%2" createUnit [getpos _dogOwner, _dogGrp,"%1=this; this setSpeedMode ""NORMAL""; this setbehaviour ""CARELESS""",1]',_dogName,_chosenBreed];
_dog = call compile format ["%1",_dogName];
*/
_dog = _dogGrp createUnit [_chosenBreed, getpos _dogOwner, [], 5, "CAN_COLLIDE"];
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
//[_dog] join _dogGrp;

0 = [_dog,_dogOwner] spawn {
params ["_dog","_dogOwner"];
_dog = _this select 0;
_dogOwner = _this select 1;

_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
_dog setSpeaker "NoVoice";
_dog setBehaviour "CARELESS";
_dog setAnimSpeedCoef 2;
//_dog disableAI "FSM";
//_dog disableAI "ANIM";
_dog setSkill 1;
[_dog] join (group _dogOwner);

while {alive _dog} do {
_nearHumans = [];
_targetHumans = [];
_dogCheckDist = 500;
_closestHuman = objNull;
_nearHumans = nearestObjects [getPos _dog, ["man"], 150];
{
if ((side _dogOwner) getFriend (side _x) < 0.6) then {_targetHumans = _targetHumans + [_x]; _dog knowsabout _x; _dogOwner knowsabout _x;}
}forEach _nearHumans;

if (count _targetHumans > 0) then {
_closestHuman = _targetHumans select 0;
_dogCheckDist = (_dog distance2d _closestHuman);
_dog setspeedmode "FULL";

if ((_dogCheckDist > 125) && (_dogCheckDist < 150)) then {
_dog dowatch _closestHuman;	
_barkType = round(random 2);
	switch (_barkType) do {
		case 0:
		{
		[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
		};
		case 1:
		{
		[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
		};
		case 2:
		{
		[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
		};
	};
};			

if ((_dogCheckDist > 50) && (_dogCheckDist < 125)) then {
_dog moveTo getPos _closestHuman;
sleep (0.5 + random(0.5));
_dog playMove "Dog_Run";
_barkType = round(random 2);
	switch (_barkType) do {
		case 0:
		{
		[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
		};
		case 1:
		{
		[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
		};
		case 2:
		{
		[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
		};
	};	
};

if ((_dogCheckDist > 25) && (_dogCheckDist < 50)) then {
_dog moveTo getPos _closestHuman;
sleep (0.5 + random(0.5));
_dog playMove "Dog_Run";
_barkType = round(random 2);
	switch (_barkType) do {
		case 0:
		{
		[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
		};
		case 1:
		{
		[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
		};
		case 2:
		{
		[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
		};
	};	
};

if ((_dogCheckDist > 15) && (_dogCheckDist < 25)) then {			
_dog moveTo getPos _closestHuman;
sleep (0.5 + random(0.5));
_dog playMove "Dog_Sprint";
_barkType = round(random 2);
switch (_barkType) do {
case 0:
{
[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
};
case 1:
{
[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
};
case 2:
{
[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
};
};	
};

if ((_dogCheckDist > 5) && (_dogCheckDist < 15)) then {
_barkType = round(random 1);
	switch (_barkType) do {
		case 0:
		{
		[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
		};
		case 1:
		{
		[_dog, "ronroneo1"] call CBA_fnc_globalSay3d;
		};
	};	
_dog moveTo getPos _closestHuman;
sleep (0.5 + random(0.5));
_dog playMove "Dog_Sprint";
};

if ((_dogCheckDist > 2) && (_dogCheckDist < 5)) then {
_barkType = round(random 1);
	switch (_barkType) do {
		case 0:
		{
		[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
		};
		case 1:
		{
		[_dog, "ronroneo1"] call CBA_fnc_globalSay3d;
		};
	};
_dog moveTo getPos _closestHuman;
sleep (0.5 + random(0.5));
_dog playMove "Dog_Sprint";
};

if (_dogCheckDist < 2) then {
_dog moveTo getPos _closestHuman;

	if (vehicle _closestHuman isKindOf "CAManBase") then {
		_checkTargetDam = getDammage _closestHuman;
		_dog playMove "Dog_Stop";
		_biteDamage = _checkTargetDam + 0.3;
		[_dog, "mordisco"] call CBA_fnc_globalSay3d;		
		//_closestHuman setdamage _biteDamage;
		//_closestHuman switchMove "AdthPercMstpSlowWrflDnon_8";
		_closestHuman setHitPointDamage ["hitLegs", _biteDamage];
		[_closestHuman, "grito"] call CBA_fnc_globalSay3d;
		_closestHuman setUnconscious true;
		sleep 5;
		_closestHuman setUnconscious false;
		_closestHuman switchMove "";
		_biteDamage = "";
		//_dog playMove "Dog_Idle_Stop";
		sleep 0.5;
	};
};

};

sleep 0.1;

if (!alive _dog) exitWith {
	_dogGrpSideLogic = createGroup sideLogic;
	_deadDogLogic = _dogGrpSideLogic createUnit ["logic", getPos _dog, [], 0, "none"];
	[_deadDogLogic, "llanto"] call CBA_fnc_globalSay3d;
	sleep 5;
	deleteVehicle _deadDogLogic
};

if (_dog distance _dogOwner > 3 && count _targetHumans < 1) then {
_dog moveTo getPos _dogOwner;
_dog setspeedmode "NORMAL";
_dog playMove "Dog_Walk";
};

if (_dog distance _dogOwner < 3 && count _targetHumans < 1) then {
_dog playMove "Dog_Idle_Stop";
};

};
};

};

 

 

 

 

 

I hope we can get this baby to the finish line together. 

 

Thank you in advanced!

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, LSValmont said:

I hope we can get this baby to the finish line together. 

Hey man, I'll try and  take a look at it. But it might not be until early next week as I have alot going on through the weekend. 

  • Like 1
  • Thanks 1

Share this post


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

Hey man, I'll try and  take a look at it. But it might not be until early next week as I have alot going on through the weekend. 

 

Thank you Johnny!

 

Godspeed on your weekend and don't worry about timing... all I care is to have something MP compatible working in the future for all our players 😃

Share this post


Link to post
Share on other sites

@LSValmont  Hey buddy, woke up early so took a look.  In your while loop you are executing a playMove on the dog on every iteration.  Animals work funny, so you only want to execute the playMove one time and the dog repeats that move forever until you playMove a different move.  So if you want the dog to follow you playMove Run animation only once, and give him new moveTo position commands.  He will keep running and move to each new position.  When you finally want him to stop you playMove Stop animation once and he stops.  Then playMove Run again to get him to run.  Your current code is giving him a million playMoves so he's going  crazy.   Here's how to fix that:

 

Before the while dog alive loop, add this line:

		_last_anim = "";
		while {alive _dog} do 

Then go through your code and wrap every playMove with an IF statement that only executes the playMove if the move is different than last animation.  For example, you would replace this line:

_dog playMove "Dog_Run";

...with this line:

if !(_last_anim == "Dog_Run") then { _dog playMove "Dog_Run"; _last_anim = "Dog_Run";};

Follow that pattern and replace every playMove in your script.  That should solve your problem (unless there are other problems).

 

And here's some friendly advice from an old software engineer:  Format your code so you indent all loops and IF statements.  This makes it much more readable.  Here's your same code formatted with tabs (hopefully pasting into the forum code box keeps the tabs).

Spoiler

if (!isServer) exitWith {};
params ["_dogOwner", "_dogBreed", "_dogsAmount"];

_dogOwner = _this select 0;
_dogBreed = _this select 1;
_dogsAmount = _this select 2;

_dogSide = side _dogOwner;
_dogGrp = creategroup _dogSide;

for "_i" from 1 to _dogsAmount do 
{

	_chosenBreed = "Alsatian_Random_F";

	switch (_dogBreed) do {
		case "Alsatian_Random_F":
		{
		_chosenBreed = "Alsatian_Random_F";
		};
		case "Fin_random_F":
		{
		_chosenBreed = "Fin_random_F";
		};
		default 
		{ 
		_chosenBreed = "Fin_random_F";
		};
	};
	/*
	_dogName = format ["k9%1",round (random 1000)];
	call compile format ['"%2" createUnit [getpos _dogOwner, _dogGrp,"%1=this; this setSpeedMode ""NORMAL""; this setbehaviour ""CARELESS""",1]',_dogName,_chosenBreed];
	_dog = call compile format ["%1",_dogName];
	*/
	_dog = _dogGrp createUnit [_chosenBreed, getpos _dogOwner, [], 5, "CAN_COLLIDE"];
	_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
	//[_dog] join _dogGrp;

	0 = [_dog,_dogOwner] spawn 
	{
		params ["_dog","_dogOwner"];
		_dog = _this select 0;
		_dogOwner = _this select 1;

		_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
		_dog setSpeaker "NoVoice";
		_dog setBehaviour "CARELESS";
		_dog setAnimSpeedCoef 2;
		//_dog disableAI "FSM";
		//_dog disableAI "ANIM";
		_dog setSkill 1;
		[_dog] join (group _dogOwner);

		_last_anim = "";
		while {alive _dog} do 
		{
			_nearHumans = [];
			_targetHumans = [];
			_dogCheckDist = 500;
			_closestHuman = objNull;
			_nearHumans = nearestObjects [getPos _dog, ["man"], 150];
			{
				if ((side _dogOwner) getFriend (side _x) < 0.6) then {_targetHumans = _targetHumans + [_x]; _dog knowsabout _x; _dogOwner knowsabout _x;}
			}forEach _nearHumans;

			if (count _targetHumans > 0) then 
			{
				_closestHuman = _targetHumans select 0;
				_dogCheckDist = (_dog distance2d _closestHuman);
				_dog setspeedmode "FULL";

				if ((_dogCheckDist > 125) && (_dogCheckDist < 150)) then 
				{
					_dog dowatch _closestHuman;	
					_barkType = round(random 2);
					switch (_barkType) do {
						case 0:
						{
						[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
						};
						case 1:
						{
						[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
						};
						case 2:
						{
						[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
						};
					};
				};			

				if ((_dogCheckDist > 50) && (_dogCheckDist < 125)) then 
				{
					_dog moveTo getPos _closestHuman;
					sleep (0.5 + random(0.5));
					_dog playMove "Dog_Run";
					_barkType = round(random 2);
					switch (_barkType) do {
						case 0:
						{
						[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
						};
						case 1:
						{
						[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
						};
						case 2:
						{
						[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
						};
					};	
				};

				if ((_dogCheckDist > 25) && (_dogCheckDist < 50)) then 
				{
				_dog moveTo getPos _closestHuman;
				sleep (0.5 + random(0.5));
				_dog playMove "Dog_Run";
				_barkType = round(random 2);
					switch (_barkType) do {
						case 0:
						{
						[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
						};
						case 1:
						{
						[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
						};
						case 2:
						{
						[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
						};
					};	
				};

				if ((_dogCheckDist > 15) && (_dogCheckDist < 25)) then 
				{			
					_dog moveTo getPos _closestHuman;
					sleep (0.5 + random(0.5));
					_dog playMove "Dog_Sprint";
					_barkType = round(random 2);
					switch (_barkType) do {
					case 0:
					{
					[_dog, "ladrido1"] call CBA_fnc_globalSay3d;
					};
					case 1:
					{
					[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
					};
					case 2:
					{
					[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
					};
					};	
				};

				if ((_dogCheckDist > 5) && (_dogCheckDist < 15)) then 
				{
					_barkType = round(random 1);
						switch (_barkType) do {
							case 0:
							{
							[_dog, "ladrido2"] call CBA_fnc_globalSay3d;
							};
							case 1:
							{
							[_dog, "ronroneo1"] call CBA_fnc_globalSay3d;
							};
						};	
					_dog moveTo getPos _closestHuman;
					sleep (0.5 + random(0.5));
					_dog playMove "Dog_Sprint";
				};

				if ((_dogCheckDist > 2) && (_dogCheckDist < 5)) then 
				{
					_barkType = round(random 1);
						switch (_barkType) do {
							case 0:
							{
							[_dog, "ladrido3"] call CBA_fnc_globalSay3d;
							};
							case 1:
							{
							[_dog, "ronroneo1"] call CBA_fnc_globalSay3d;
							};
						};
					_dog moveTo getPos _closestHuman;
					sleep (0.5 + random(0.5));
					_dog playMove "Dog_Sprint";
				};

				if (_dogCheckDist < 2) then {
					_dog moveTo getPos _closestHuman;

					if (vehicle _closestHuman isKindOf "CAManBase") then 
					{
						_checkTargetDam = getDammage _closestHuman;
						_dog playMove "Dog_Stop";
						_biteDamage = _checkTargetDam + 0.3;
						[_dog, "mordisco"] call CBA_fnc_globalSay3d;		
						//_closestHuman setdamage _biteDamage;
						//_closestHuman switchMove "AdthPercMstpSlowWrflDnon_8";
						_closestHuman setHitPointDamage ["hitLegs", _biteDamage];
						[_closestHuman, "grito"] call CBA_fnc_globalSay3d;
						_closestHuman setUnconscious true;
						sleep 5;
						_closestHuman setUnconscious false;
						_closestHuman switchMove "";
						_biteDamage = "";
						//_dog playMove "Dog_Idle_Stop";
						sleep 0.5;
					};
				};

			};

			sleep 0.1;

			if (!alive _dog) exitWith 
			{
				_dogGrpSideLogic = createGroup sideLogic;
				_deadDogLogic = _dogGrpSideLogic createUnit ["logic", getPos _dog, [], 0, "none"];
				[_deadDogLogic, "llanto"] call CBA_fnc_globalSay3d;
				sleep 5;
				deleteVehicle _deadDogLogic
			};

			if (_dog distance _dogOwner > 3 && count _targetHumans < 1) then 
			{
				_dog moveTo getPos _dogOwner;
				_dog setspeedmode "NORMAL";
				_dog playMove "Dog_Walk";
			};

			if (_dog distance _dogOwner < 3 && count _targetHumans < 1) then {
				_dog playMove "Dog_Idle_Stop";
			};

		};
	};

};

 

 

  • Like 1
  • Thanks 1

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

×