Jump to content
johnnyboy

JBOY Turbo Chicken [Updated to V1.2]

Recommended Posts

Updated to V1.2 on 12/31/2016.

This may be the most important ground-breaking epic stupendous Arma script release ever! ;) Or not.   Now your lame Arma chickens will react to players and fly!  I can see using this to startle players in the bush, a natural alarm (what disturbed those chickens?), game hunting, and general ambience.  This is part of the JBOY Dog script package, but I'm putting it here on its own, so you can have just the JBOY Chickens without the heavy JBOY Dog scripts.

Download (download link updated to Version 1.2 on 12/31/2016)

 

Download the zip file and unzip it into your missions directory.  You can then try it in the Editor.

Features:

  • Rabbits and chickens sense when men or dogs are near, and will scatter.
  • Chickens fly!
  • "Poof-of-feathers" effect occurs when damaged.
  • JBOY Dogs can attack and retrieve them (but you need JBOY Dog scripts for that).
  • Chickens cluck and roosters crow
  • If men crawl through chickens, they don't scatter unless very close.
  • Moving vehicles will scatter chickens also.

Credits:

  • SuperTruite for his amazing particle effects utility
  • PersianMO for making it MP/JIP compliant.  Thanks man, that was a big help!
  • Froggyluv for suggesting chicken clucking sound fx.  Great idea.

V1.1. Change Log:

  • Made script MP/JIP compliant (thanks to PersianMO)
  • Added in sound fx for chicken clucking and rooster crowing.

V1.2 Change Log:

  • You can now crawl within a meter of a chicken or matter without scattering them.  If you are prone or standing they scatter when you are 8 meters away.
  • Moving vehicles now cause chickens/rabbits to scatter.
  • Like 18

Share this post


Link to post
Share on other sites

 Get da cluck outta here...!

 

 Seriously cool addon and also serious -can we get a them to cluck? Game needs more banter

  • Like 1

Share this post


Link to post
Share on other sites

65571420.jpg

HUGE news deserves a HUGE WHOA!!!  Thanks Fiddi.

 

 Get da cluck outta here...!

 

 Seriously cool addon and also serious -can we get a them to cluck? Game needs more banter

You are Cluckin' A right my fine froggy friend.  Most excellent idea.  Will add to next release.  Going to make it property driven so you can have silent "startle birds" in the bush to spook player with flutter sound.  And some good old barnyard banter as well (guess I need the occasional rooster crow too).  Gonna have to update the demo with that old Blues song "Little Red Rooster"...

  • Like 2

Share this post


Link to post
Share on other sites

:D Fantastic . is it working on MP?

Thanks PMO!  It should be MP compatible.  Animations played via PlayMove, not switchmove.  And wings sound played via remote_exec.

 

The only part I am unsure about is the feather poof particle effect.  Are particle effects played everywhere?  Do I have to do something special to get that to play on all clients?

 

 

Man... This guy is awesome.

Awww, shucks. :blush:

Share this post


Link to post
Share on other sites

allright.i had a test on dedicated server.script working for players but not for jips.

JIPs re spawn some rabbit and chicken that reading on init.sqf but act like vanilla animals.they won't fly or run.

for JIPs those chickens and rabbit that spawned at start mission working fine.

also particle effects didn't work at all on server.

I think particle effects commands are local.im not sure about this, have to check out wiki.

perhaps run "nul = [bird] execVM "JBOY\featherEffect.sqf";" with remote exec solve problem.

 

  • Like 1

Share this post


Link to post
Share on other sites

allright.i had a test on dedicated server.script working for players but not for jips.

JIPs re spawn some rabbit and chicken that reading on init.sqf but act like vanilla animals.they won't fly or run.

for JIPs those chickens and rabbit that spawned at start mission working fine.

also particle effects didn't work at all on server.

I think particle effects commands are local.im not sure about this, have to check out wiki.

perhaps run "nul = [bird] execVM "JBOY\featherEffect.sqf";" with remote exec solve problem.

Thanks much for the testing.  I'll be sure to change executing of featherEffects to use remote exec.

 

I don't know what to do about JIP for those chickens/rabbits that start acting like vanilla after JIP.  Anyone have any suggestions? 

 

Also note, that currently the mission maker has to designate which chickens and rabbits are running this script.  So ambient rabbits generated by ARMA engine are not currently running these scripts.  But we could add code to find rabbits within X meters of players, and run the scripts on them.  One problem though, is I believe that ambient rabbits are local, so one player sees a rabbit, and the other client player does not. 

Share this post


Link to post
Share on other sites

Lol, neat looking concept.

 

As always if you want me to dig through my sound effects I bet I have at least one that might be useful to you. PM me if you think you need any.

  • Like 1

Share this post


Link to post
Share on other sites

Lol, neat looking concept.

 

As always if you want me to dig through my sound effects I bet I have at least one that might be useful to you. PM me if you think you need any.

Thanks for the offer.  If you have any chicken clucking, rooster crowing sounds that would be great.  But don't hassle it if its time consuming.  I can grab something off the net pretty easily probably. 

Share this post


Link to post
Share on other sites

Although perhaps a bit silly there is a practical use for the chickens now, watch/guard chickens. They can act as an early warning device of approaching enemy stealth troops.  :)

  • Like 1

Share this post


Link to post
Share on other sites

Pretty nice, now with this dogs, and rabits this is farming simulator :P

Good job!

Share this post


Link to post
Share on other sites

Release frontpaged on the Armaholic

Thanks much Foxhound.  You the man!

 

Although perhaps a bit silly there is a practical use for the chickens now, watch/guard chickens. They can act as an early warning device of approaching enemy stealth troops.   :)

Exactly dr@gon.  More ambience and fun early warning device! :)

 

Pretty nice, now with this dogs, and rabits this is farming simulator :P

Good job!

Thanks Vasily, goats and sheep are coming soon.  Don't worry, I won't make them fly.

  • Like 1

Share this post


Link to post
Share on other sites

allright.i had a test on dedicated server.script working for players but not for jips.

JIPs re spawn some rabbit and chicken that reading on init.sqf but act like vanilla animals.they won't fly or run.

for JIPs those chickens and rabbit that spawned at start mission working fine.

also particle effects didn't work at all on server.

I think particle effects commands are local.im not sure about this, have to check out wiki.

perhaps run "nul = [bird] execVM "JBOY\featherEffect.sqf";" with remote exec solve problem.

Hey Persian, I don't understand JIP so well.  You're saying that JIP creates new new rabbits and chickens because that is in my init.sqf, right?  And its these JIP spawned ones then act like vanilla?

 

How do I fix it so I only execute rabbit and chicken creation on initial mission start up, and not again on JIP?

 

And thanks for the effects suggestion, I am changing that to be remote exec now.

Share this post


Link to post
Share on other sites

Fixed jip and particle effects for server, sort of., i think.i had a test on server and looks fine.

 

for jip and locality if you didn't see this: https://community.bistudio.com/wiki/6thSense.eu:EG#Determining_if_machine_is_Ingame_Server.2C_Ded_Server.2C_Player_or_JIP_Player

jip fix is in init.sqf and particle effects fix is in addBirdDamageEH.sqf and featherEffect.sqf

I hope this can help you.

 

Changes:(description in script lines)

 

init.sqf

//if(!isServer) then {waitUntil{!isNull player}};
JBOY_say3d =              compile preprocessFileLineNumbers "JBOY\JBOY_say3d.sqf";
JBOY_isFetchable =        compile preprocessFileLineNumbers "JBOY\JBOY_isFetchable.sqf";
JBOY_turboChicken =       compile preprocessFileLineNumbers "JBOY\JBOY_turboChicken.sqf";
//addBirdDamageEHs =        compile preprocessFileLineNumbers "JBOY_Dog\addBirdDamageEHs.sqf";


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


// **************************************************************************
// Create some rabbits and chickens explicitly.  These small animals will run or fly when dog or man approaches.
// **************************************************************************
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] 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 [2, 100], [], 0, "NONE"];
C3 = createAgent ['Cock_random_F', rabbitPos getRelPos [4, 200], [], 0, "NONE"];
C4 = createAgent ['Cock_white_F', rabbitPos getRelPos [1, 100], [], 0, "NONE"];

// **************************************************************************
// Also look at Animals Module in this mission used to create hens.
// It has the following line of code in the module's init field, which readies
// the birds and rabbits to scatter.
// **************************************************************************
// nul = [this, 20] execVM "JBOY\addBirdDamageEHs.sqf";

addBirdDamageEH.sqf

//////////////////////////////////////////////////////////
// addBirdDamageEH.sqf 
// Created by: johnnyboy
//
// Give object a boost when sticks in shallow water
//
// nul = [bird] execVM "JBOY_Dog\addBirdDamageEH.sqf";
//////////////////////////////////////////////////////////
if (!isServer)  exitwith {};
params["_bird"];
if (_bird isKindOf "Fowl_Base_F") then                       
{
        _bird removeAllEventHandlers "HandleDamage";
        _bird addEventHandler ["HandleDamage", 
        { 
            private ["_return"];
            _bird = _this select 0; 
            _selection = _this select 1; 
            _passedDamage = _this select 2; 
            _source	= _this select 3; 
            _projectile = _this select 4; 
            diag_log["damage",_bird,_selection,_passedDamage,_source,_projectile];
			//run on all machines
			[[[_bird],"JBOY\featherEffect.sqf"],"BIS_fnc_execVM",true,false] call BIS_fnc_MP;
           // nul = [_bird] execVM "JBOY\featherEffect.sqf";
            _return = _passedDamage;
           _return
        }];
};

featherEffect.sqf

// Puff of feathers spawned around object.  Preferably a bird!!  Or a guy with down vest!
//
// nul = [bird] execVM "JBOY\featherEffect.sqf";
//////////////////////////////////////////////////////////

// execute on clients too
//if (!isServer)  exitwith {};
params["_bird"];
Private["_effect"];
_effect = "#particlesource" createVehicleLocal [0,0,0]; //(getPos player);
_effect setParticleParams [["\A3\data_f\cl_feathers2", 1, 0, 1], "", 
       "SpaceObject", 0.4, 1, [0, 0, 0], [0, 0, 2], 0, 8, 4, 0.075, [1.4, 2, 4], [[0.1, 0.1, 0.1, 1], [0.25, 0.25, 0.25, 0.5], [0.5, 0.5, 0.5, 0]], 
       [0.08], 0.9, 0.6, "", "", _bird];
_effect setParticleRandom [0, [0.25, 0.25, 0], [0.1, 0.1, 0], 0, 0.1, [0, 0, 0, 0.1], 1, 1];
_effect setParticleCircle [0, [0, 0, 0]];
_effect setDropInterval 0.02;  
_effect attachTo [_bird,[0,0,0]];
sleep .5;
//_emitterArray = _effect getVariable "effects";
//{deleteVehicle _x} forEach _emitterArray;
deleteVehicle _effect;

  • Like 1

Share this post


Link to post
Share on other sites

 

Fixed jip and particle effects for server, sort of., i think.i had a test on server and looks fine.

 

for jip and locality if you didn't see this: https://community.bistudio.com/wiki/6thSense.eu:EG#Determining_if_machine_is_Ingame_Server.2C_Ded_Server.2C_Player_or_JIP_Player

jip fix is in init.sqf and particle effects fix is in addBirdDamageEH.sqf and featherEffect.sqf

I hope this can help you.

 

Wow.  Thanks a million PMO. Will make your changes soon, plusI learned something new.  You rock.  I'm going to find some clucking sound fx, and add them in, then I'll publish an update (and update JBOY dog with same chicken changes).

 

What I learned here I can apply to JBOY Dog to get it JIP compliant also.  Sweet.

Share this post


Link to post
Share on other sites
Guest

I would use remoteExec rather than BIS_fnc_MP tho.

Share this post


Link to post
Share on other sites

Specially for the escaping rabbits i will download this mod. I'm very disapointed how Arma developers threated wild life - never seen rabbit or any WILD life not escaping from human (from animals available in arma), good they not decided to make those animals attacking player. I could imagine "chicken hit", "rabbit shoot", or "goat bite".....

  • Like 1

Share this post


Link to post
Share on other sites

Damn, those chickens have some serious acceleration...

  • Like 1

Share this post


Link to post
Share on other sites

Damn, those chickens have some serious acceleration...

There's no women on these islands bro.  These chickens learned the hard way its best not to get caught by a soldier. :omg:

 

You can adjust the acceleration to your liking pretty easily.

  • Like 1

Share this post


Link to post
Share on other sites

Script Updated to Version 1.1 (download link in original post is updated)

 

Changes:

  • Now MP/JIP compatible thanks to PersianMO
  • Added chicken clucking and rooster crowing sound fx (thanks to Froggyluv's suggestion).
  • Chicken banter sounds can be toggled off or on by the mission maker via a parameter.

This vid shows the new sounds.

 

Next steps are to incorporate these chicken changes into JBOY Dog, and improve JBOY dog.

  • Like 3

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

×