Jump to content
johnnyboy

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

Recommended Posts

Just now, Kronons said:

 

Thanks! I reinstalled a fresh copy with everything set to default. Hopefully I see a dog! Will report back.

Good luck.  When he shows up, be nice to him.  His name is Boomer and he is one hell of a good dog.

  • Like 2

Share this post


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

Good luck.  When he shows up, be nice to him.  His name is Boomer and he is one hell of a good dog.

 

He will be in good hands. :)

 

No Boomer yet. Fresh copy no errors in rpt. I guess it doesn't work on dedicated server with out some tweaks to your base code.

Share this post


Link to post
Share on other sites

Reporting back. I got boomer to spawn. Now I am going to work on getting the rest of the scripts to work. 

Share this post


Link to post
Share on other sites

I got it to work!!! The issue is the "!isserver" and "JIP" commenting them out makes it work.

  • Like 2

Share this post


Link to post
Share on other sites

I re-read @Persian MO posts on the JBOY chicken thread, and I think I understand it now.  This JIP test was intended to keep from spamming rabbits and chickens per JIP player.

So if you remove these lines from the init.sqf:

//if jip player and not server then exit
_JIPplayer = not isServer && isNull player;
if (_JIPplayer) exitwith {};

And then put this new JIP if condition around the code that spawns the chickens and rabbits:



//if jip player then exit _JIPplayer = not isServer && isNull player; if (!_JIPplayer) then { // ************************************************************************** // Create some rabbits and chickens explicitly. These small animals will run or fly when dog or man approaches. // Also look at Animals Module in sample mission for adding chickens. It has call to scatter script in the module's init field. // ************************************************************************** R1 = createAgent ['Rabbit_F', rabbitPos getRelPos [2, 0], [], 0, "NONE"]; R2 = createAgent ['Rabbit_F', rabbitPos getRelPos [5, 90], [], 0, "NONE"]; R3 = createAgent ['Rabbit_F', rabbitPos getRelPos [4, 180], [], 0, "NONE"]; R4 = createAgent ['Rabbit_F', rabbitPos getRelPos [2, 270], [], 0, "NONE"]; {nul = [_x,true] execVM "JBOY\JBOY_animalScatter.sqf";} foreach [R1,R2,R3,R4]; // rabbits will scatter when dog or man near. C1 = createAgent ['Cock_random_F', rabbitPos getRelPos [3, 200], [], 0, "NONE"]; C2 = createAgent ['Cock_white_F', rabbitPos getRelPos [3, 100], [], 0, "NONE"]; S1 = createAgent ['Snake_random_F', rabbitPos getRelPos [3, 200], [], 0, "NONE"]; S2 = createAgent ['Snake_random_F', rabbitPos getRelPos [1, 200], [], 0, "NONE"]; };

That should keep JIP from spamming animals, and make the main init.sqf execute clean for dedicated server (I hope).  I foolishly copied over Persian's solution from the chicken script (where it works as he intended) into the wrong place in the dog script (my fault).

 

@Kronons this is great progress.  Please keep reporting any dedicated server issues and solutions you encounter.  I'm going to credit you in the first post for this great  contribution. 

 

Share this post


Link to post
Share on other sites

so....attempted to put the script into a dedi MP server.......result from server rpt:

 

Spoiler

 8:41:06 Error in expression <u = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};>

 8:41:06   Error position: <JBOY_fnc_DogDisplayEH;};>

 8:41:06   Error Undefined variable in expression: jboy_fnc_dogdisplayeh

 8:41:06 Error in expression <= "";

_last_anim = "";

_objects = [];


 


 

_dog disableAI "TARGET";


 


 


 


 

_biteObj = >

 8:41:06   Error position: <_dog disableAI "TARGET";


 


 


 


 

_biteObj = >

 8:41:06   Error Undefined variable in expression: _dog

 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 13

 8:41:06 Error in expression <

{

_handler setVariable ["vDogAssigned",_dog,true];

}; 


 

_firstTime = false;

_mo>

 8:41:06   Error position: <_dog,true];

}; 


 

_firstTime = false;

_mo>

 8:41:06   Error Undefined variable in expression: _dog

 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 29

 8:41:06 Error in expression <Command", 'idle', true];


 

while {(alive _dog)} do

{ 

_handler = _dog getVariable>

 8:41:06   Error position: <_dog)} do

{ 

_handler = _dog getVariable>

 8:41:06   Error Undefined variable in expression: _dog

 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 44

 8:41:06 Error in expression <bjNull;

sleep .1;

_moveToPos = [0,0,0];

_dog setSpeaker "NoVoice";


 

if (!isNull >

 8:41:06   Error position: <_dog setSpeaker "NoVoice";


 

if (!isNull >

 8:41:06   Error Undefined variable in expression: _dog

 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 25

 8:41:07 House not found in the list


 

 8:41:07 House 53abca20# 1055488: majak.p3d (from) not found in the operative map

 8:41:09 Error in expression <u = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};>

 8:41:09   Error position: <JBOY_fnc_DogDisplayEH;};>

 8:41:09   Error Undefined variable in expression: jboy_fnc_dogdisplayeh

 8:41:10 Error in expression <= "";

_last_anim = "";

_objects = [];


 


 

_dog disableAI "TARGET";


 


 


 


 

_biteObj = >

 8:41:10   Error position: <_dog disableAI "TARGET";


 


 


 


 

_biteObj = >

 8:41:10   Error Undefined variable in expression: _dog

 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 13

 8:41:10 Error in expression <

{

_handler setVariable ["vDogAssigned",_dog,true];

}; 


 

_firstTime = false;

_mo>

 8:41:10   Error position: <_dog,true];

}; 


 

_firstTime = false;

_mo>

 8:41:10   Error Undefined variable in expression: _dog

 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 29

 8:41:10 Error in expression <Command", 'idle', true];


 

while {(alive _dog)} do

{ 

_handler = _dog getVariable>

 8:41:10   Error position: <_dog)} do

{ 

_handler = _dog getVariable>

 8:41:10   Error Undefined variable in expression: _dog

 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 44

 8:41:10 Error in expression <bjNull;

sleep .1;

_moveToPos = [0,0,0];

_dog setSpeaker "NoVoice";


 

if (!isNull >

 8:41:10   Error position: <_dog setSpeaker "NoVoice";


 

if (!isNull >

 8:41:10   Error Undefined variable in expression: _dog

 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 25

Any help would be grateful!!!

Share this post


Link to post
Share on other sites
50 minutes ago, T.Gavin said:

so....attempted to put the script into a dedi MP server.......result from server rpt:

 

  Reveal hidden contents


 8:41:06 Error in expression <u = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};>


 8:41:06   Error position: <JBOY_fnc_DogDisplayEH;};>


 8:41:06   Error Undefined variable in expression: jboy_fnc_dogdisplayeh


 8:41:06 Error in expression <= "";


_last_anim = "";


_objects = [];



 



 


_dog disableAI "TARGET";



 



 



 



 


_biteObj = >


 8:41:06   Error position: <_dog disableAI "TARGET";



 



 



 



 


_biteObj = >


 8:41:06   Error Undefined variable in expression: _dog


 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 13


 8:41:06 Error in expression <


{


_handler setVariable ["vDogAssigned",_dog,true];


}; 



 


_firstTime = false;


_mo>


 8:41:06   Error position: <_dog,true];


}; 



 


_firstTime = false;


_mo>


 8:41:06   Error Undefined variable in expression: _dog


 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 29


 8:41:06 Error in expression <Command", 'idle', true];



 


while {(alive _dog)} do


{ 


_handler = _dog getVariable>


 8:41:06   Error position: <_dog)} do


{ 


_handler = _dog getVariable>


 8:41:06   Error Undefined variable in expression: _dog


 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 44


 8:41:06 Error in expression <bjNull;


sleep .1;


_moveToPos = [0,0,0];


_dog setSpeaker "NoVoice";



 


if (!isNull >


 8:41:06   Error position: <_dog setSpeaker "NoVoice";



 


if (!isNull >


 8:41:06   Error Undefined variable in expression: _dog


 8:41:06 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 25


 8:41:07 House not found in the list



 


 8:41:07 House 53abca20# 1055488: majak.p3d (from) not found in the operative map


 8:41:09 Error in expression <u = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};>


 8:41:09   Error position: <JBOY_fnc_DogDisplayEH;};>


 8:41:09   Error Undefined variable in expression: jboy_fnc_dogdisplayeh


 8:41:10 Error in expression <= "";


_last_anim = "";


_objects = [];



 



 


_dog disableAI "TARGET";



 



 



 



 


_biteObj = >


 8:41:10   Error position: <_dog disableAI "TARGET";



 



 



 



 


_biteObj = >


 8:41:10   Error Undefined variable in expression: _dog


 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 13


 8:41:10 Error in expression <


{


_handler setVariable ["vDogAssigned",_dog,true];


}; 



 


_firstTime = false;


_mo>


 8:41:10   Error position: <_dog,true];


}; 



 


_firstTime = false;


_mo>


 8:41:10   Error Undefined variable in expression: _dog


 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 29


 8:41:10 Error in expression <Command", 'idle', true];



 


while {(alive _dog)} do


{ 


_handler = _dog getVariable>


 8:41:10   Error position: <_dog)} do


{ 


_handler = _dog getVariable>


 8:41:10   Error Undefined variable in expression: _dog


 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 44


 8:41:10 Error in expression <bjNull;


sleep .1;


_moveToPos = [0,0,0];


_dog setSpeaker "NoVoice";



 


if (!isNull >


 8:41:10   Error position: <_dog setSpeaker "NoVoice";



 


if (!isNull >


 8:41:10   Error Undefined variable in expression: _dog


 8:41:10 File mpmissions\__cur_mp.Chernarus_Summer\JBOY_Dog\JBOY_dogCommand.sqf, line 25

Any help would be grateful!!!

@T.Gavin  Try what I said in my post previous to yours and remove those 3 lines of code.

 

And try this:

 I would comment out or remove all my init.sqf code you copied AFTER the line below.  This will restrict your inital dog integration to spawing one dog associated with a player.   Once you get that working, you can decide if you want to implement other dogs handled by AI, independent dog packs, a unit to be tracked by dogs, etc.   Let's just get a player controlled dog working first.

On 2/16/2017 at 10:23 PM, Kronons said:

_dmy = [quarry1] spawn {params["_prey"];sleep 2; preyObject1=[_prey] call JBOY_dogPreyInit;};

 

Share this post


Link to post
Share on other sites

I did remove them and followed the post...I dont use the chickens or anything so I didnt add that extra code.  But the 3 lines were removed.

Share this post


Link to post
Share on other sites

Please post the init.sqf file you have now.  Maybe @Kronons can help, as he said he just got this working on dedi.  The undefined variable _dog implies the dog was not created before JBOY_cogCommand was called in the init.sqf.  I don't know why that is true in your case.  Note I will likely be offline for a few days and won't be able help until Tuesday maybe.  Good luck.

Share this post


Link to post
Share on other sites
Spoiler

if (local player) then {
  player enableFatigue false;
  player enableStamina false;
  player addEventhandler ["Respawn", {player enableFatigue false}];
  player addEventHandler ["Respawn", {player enableStamina  false}];
};
player setCustomAimCoef 0.1;
player setUnitRecoilCoefficient 0.1;
player addEventHandler ["Respawn", {player setCustomAimCoef 0.1;}];
player addEventHandler ["Respawn", {player setUnitRecoilCoefficient 0.1}];
if(isDedicated)exitWith{};

//Script Powerpoint
BRIEF_setObjectTextureGlobal = {(_this select 0) setObjectTextureGlobal (_this select 1)};

MAC_fnc_switchMove = {
    private["_object","_anim"];
    _object = _this select 0;
    _anim = _this select 1;

    _object switchMove _anim;
    
};
[] execVM "Ares_AddRhsReinforcementPools.sqf";
//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_turboChicken =       compile preprocessFileLineNumbers "JBOY\JBOY_turboChicken.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";

 

// **************************************************************************
// 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 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
//nul = [dog1, handler1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

 

 

Share this post


Link to post
Share on other sites
_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice 

In my test mission I have named the player unit handler1.  Did you name your player unit in editor handler1?  If not, that could be the problem. I should clarify this in my comments in init.sqf.

Share this post


Link to post
Share on other sites
On 2/18/2017 at 0:32 PM, johnnyboy said:

Please post the init.sqf file you have now.  Maybe @Kronons can help, as he said he just got this working on dedi.  The undefined variable _dog implies the dog was not created before JBOY_cogCommand was called in the init.sqf.  I don't know why that is true in your case.  Note I will likely be offline for a few days and won't be able help until Tuesday maybe.  Good luck.

 

To get the basic functionality to work follow JohnnyBoy's instructions. Make sure you start with a new install. After you have everything setup the additional step is to comment out the JIP statement unless your using the other animal scripts. Then go through every file and comment out any instance of "isserver".

 

JohnnyBoy I am still looking into the issue of running the scripts at the right time. So far no issues with not defining any isserver, isdedicated, etc...Although I may look into adding custom code. Atm my server is setup to halo jump and parachute on character creation. I need to make it where it spawns the dog after the person has landed. As it is you would need to relog to have the dog spawn after parachuting. Although not a big issue.

Share this post


Link to post
Share on other sites

ok it finally works.  Now to get the coordinates for some RHS helis

Share this post


Link to post
Share on other sites
23 minutes ago, T.Gavin said:

ok it finally works.  Now to get the coordinates for some RHS helis

Good news bro.   Perseverance is a virtue!  Can you detail the changes you had to make for dedi?  Or maybe post a stripped down dedi-compliant test mission?  By stripped down, I mean no Alive, no ACE, no Mods.  Then anyone who wants a dedi example can start with the stripped down version, and then add whatever mods they want.

 

I'd like to update my scripts accordingly and re-publish the dedi-compliant version so the next guy doesn't have to share the pain you and Kronons endured. 

 

Share this post


Link to post
Share on other sites

sure!  It would only have the dog scripts in it however...no other animals stuff

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, T.Gavin said:

sure!  It would only have the dog scripts in it however...no other animals stuff

You are the man!  That would be perfect.

Share this post


Link to post
Share on other sites

is there a way to give the dogs different textures?

 

i saw an entry in the "JBOY_dog_create.sqf"

 

line 80: _dog  setVariable ["vOriginalTexture", (getObjectTextures _dog select 0), true];

 

and how do i get rid of the sphere? i deleted line 50-56 in "JBOY_dogPackCreate.sqf", but sometimes when the dog-leader of a "pack" changes, the sphere returns.

Share this post


Link to post
Share on other sites

Hello @johnnyboy

I am interested about your dog script and I want to install it on my server

you make a great job.

But for me the menu on the wheel was better. Is there any way to do it again?

 

100% translate with google translate. Sorry :)

 

Share this post


Link to post
Share on other sites

@madpat3:

10 hours ago, madpat3 said:

and how do i get rid of the sphere? i deleted line 50-56 in "JBOY_dogPackCreate.sqf", but sometimes when the dog-leader of a "pack" changes, the sphere returns.

The Sphere was for debugging purposes to mark who was pack leader.  To remove the sphere, in the init.sqf, change this line from:

 

JBOY_DEBUG = True;

to:

JBOY_DEBUG= False;

10 hours ago, madpat3 said:

is there a way to give the dogs different textures?

Yes.  Look in script JBOY_dog_create.sqf, and you will see where I add a HandleDamage eventhandler to the dogs where I apply a different texture with blood stains on the fur to the dog.  Look at the .jpg files in JBOY_Dog\Textures\ folder and you will see jpgs for each dog type (alsation or the other one) and color of the dog.  You could make your own jpgs to give different marking, colorings to dogs if you wanted.

if (((getObjectTextures _dog select 0) find "dogbloodneck")>=0) then
{
	_dog setobjecttextureGlobal [0,"JBOY_Dog\Textures\dogBloodNeck2Hole" + (typeOf _dog)+".jpg"]; // neck blood + bullet holes
} else {
	_dog setobjecttextureGlobal [0,"JBOY_Dog\Textures\dogBulletHole2" + (typeOf _dog)+".jpg"]; // bullet holes only
};

 

Share this post


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

But for me the menu on the wheel was better. Is there any way to do it again?

 

I think the wheel Action menu still works.  In the init.sqf, you see this code:

// **************************************************************************
// Create dog and have him follow player
// **************************************************************************
_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
//nul = [dog1, handler1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

Change this to the following:

// **************************************************************************
// Create dog and have him follow player
// **************************************************************************
//_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
nul = [dog1, handler1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

The change above commented out the new Key menu (JBOY_func_DogDisplayEH), and uncommented the old wheel action menu (JBOY_dog_assign_actions.sqf);  I hope that works, not 100% sure.  The newer Actions like Track might not be in that old menu, so you may have to modifiy it.

Share this post


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

@madpat3:

Yes.  Look in script JBOY_dog_create.sqf, and you will see where I add a HandleDamage eventhandler to the dogs where I apply a different texture with blood stains on the fur to the dog.  Look at the .jpg files in JBOY_Dog\Textures\ folder and you will see jpgs for each dog type (alsation or the other one) and color of the dog.  You could make your own jpgs to give different marking, colorings to dogs if you wanted.


if (((getObjectTextures _dog select 0) find "dogbloodneck")>=0) then
{
	_dog setobjecttextureGlobal [0,"JBOY_Dog\Textures\dogBloodNeck2Hole" + (typeOf _dog)+".jpg"]; // neck blood + bullet holes
} else {
	_dog setobjecttextureGlobal [0,"JBOY_Dog\Textures\dogBulletHole2" + (typeOf _dog)+".jpg"]; // bullet holes only
};

 

i already figured that out, but how about the texture of the unharmed dogs? you use the texture of the vanilla dogs (_dog  setVariable ["vOriginalTexture", (getObjectTextures _dog select 0), true];).

can that be changed with "hiddenSelectionsTextures" or something? how do i do thaT?

Share this post


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

how about the texture of the unharmed dogs? you use the texture of the vanilla dogs (_dog  setVariable ["vOriginalTexture", (getObjectTextures _dog select 0), true];).

can that be changed with "hiddenSelectionsTextures" or something? how do i do thaT?

I don't know.  You'd have to experiment.  I'm guessing animals only have one texture, but I don't know for sure.

Share this post


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

I think the wheel Action menu still works.  In the init.sqf, you see this code:


// **************************************************************************
// Create dog and have him follow player
// **************************************************************************
_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
//nul = [dog1, handler1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

Change this to the following:


// **************************************************************************
// Create dog and have him follow player
// **************************************************************************
//_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
nul = [dog1, handler1] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

The change above commented out the new Key menu (JBOY_func_DogDisplayEH), and uncommented the old wheel action menu (JBOY_dog_assign_actions.sqf);  I hope that works, not 100% sure.  The newer Actions like Track might not be in that old menu, so you may have to modifiy it.

Either I do not do it well, or it does not work. There is no menu that appears 

And I don't know if it's bug, if the dog was killed, the option take dog not appears

 

EDIT:

It worked, I did not do it well.

  • Like 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

×