Jump to content
Sign in to follow this  
JOHNsArT

JOHNS_BUGGYS

Recommended Posts

Great addons, but the dampers don't work (I think that because this you hurts when jumping). You must change somethings in the config.

This is a working cfgSkeletons.:

Quote[/b] ]

class CfgSkeletons

{

class Car;

class My_Addon: Car

{

isDiscrete = 1;

skeletonInherit = "";

skeletonBones[] =

{

"volant","",

"levy predni tlumic","",

"pravy predni tlumic","",

"levy predni zatoc","levy predni tlumic",

"pravy predni zatoc","pravy predni tlumic",

"levy zadni tlumic","",

"pravy zadni tlumic","",

"levy predni","levy predni zatoc",

"pravy predni","pravy predni zatoc",

"levy zadni","levy zadni tlumic",

"pravy zadni","pravy zadni tlumic"

};

};

};

This is a working cfgModels

Quote[/b] ]

class cfgModels

{

class Car;

class My_Addon: Car

{

sectionsInherit = "";

sections[] =

{

"pravy predni",

"levy predni",

"pravy zadni",

"levy zadni"

};

skeletonName = "My_Addon";

class Animations

{

class DrivingWheel

{

type = "rotation";

source = "drivingWheel";

selection = "volant";

begin = "osaVolantZac";

end = "osaVolantKon";

memory = "false";

animPeriod = 0;

minValue = -1;

maxValue = 1;

angle0 = -8;

angle1 = 8;

};

class FrontWheelR

{

type="rotationX";

source="wheel";

selection="pravy predni";

axis="";

memory="true";

animPeriod=0;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class FrontWheelL

{

type = "rotationX";

source = "wheel";

selection = "levy predni";

axis = "";

memory="true";

animPeriod=0;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class RearWheelR

{

type = "rotationX";

source = "wheel";

selection = "pravy zadni";

axis = "";

memory="true";

animPeriod=0;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class RearWheelL

{

type = "rotationX";

source = "wheel";

selection = "levy zadni";

axis = "";

memory="true";

animPeriod=0;

sourceAddress="loop";

minValue=0;

maxValue=1;

angle0=0;

angle1="rad -360";

};

class TurnFrontWheelR

{

type = "rotationY";

source = "drivingWheel";

selection = "pravy predni zatoc";

axis = "pravy predni";

memory = "false";

sourceAddress = "loop";

minValue="rad -180";

maxValue="rad +180";

angle0="rad +90";

angle1="rad -90";

};

class TurnFrontWheelL

{

type = "rotationY";

source = "drivingWheel";

selection = "levy predni zatoc";

axis = "levy predni";

memory = "false";

sourceAddress = "loop";

minValue="rad -180";

maxValue="rad +180";

angle0="rad +90";

angle1="rad -90";

};

class FrontWheelDamperR

{

type = "translationY";

source = "damper";

selection = "pravy predni tlumic";

axis = "";

animPeriod = 0;

minValue = -1000;

maxValue = 1000;

};

class FrontWheelDamperL

{

type = "translationY";

source = "damper";

selection = "levy predni tlumic";

axis = "";

animPeriod = 0;

minValue = -1000;

maxValue = 1000;

};

class BackWheelDamperR

{

type = "translationY";

source = "damper";

selection = "pravy zadni tlumic";

axis = "";

animPeriod = 0;

minValue = -1000;

maxValue = 1000;

};

class BackWheelDamperL

{

type = "translationY";

source = "damper";

selection = "levy zadni tlumic";

axis = "";

animPeriod = 0;

minValue = -1000;

maxValue = 1000;

};

};

};

};

There are a lot of addons that don't have working dampers/suspension. With this example code you can get it working perfectly (it is extracted from BIHummer model.cfg).

Also the dust isn't at the correct place when runing. This should be because the land contact or memory points (I don't rememeber) aren't in the correct place. But I'm not sure.

Hope that this help you.

Share this post


Link to post
Share on other sites

@Maceme

you are great man.....too , it works very well yay.gif

....i do upload the update later , but not only a config upd. i look at the geos ,think i do a third version of the buggy ...+ new sound , a pipe ? .....but before i upd. anyone knows how to include this Nitrobuster ::::

also needed i config for static object ...like a pipe

a script ore included in config? for Nitrobuster where great!

tnx guys for youre help....im a modeller a n d skinner , not the good config

Share this post


Link to post
Share on other sites

Regarding the "nitrobooster", you could simply use an eventhandler in your addon:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Eventhandlers

{

init = "_this addaction [""Nitro Boost"", ""\JOHNS_BUGGY\nitroboost.sqf""]";

};

(although using the Extended Eventhandlers mod here would be much appreciated!wink_o.gif, which adds an action to the vehicle's driver (something like "Nitro Boost") which then runs a simple script:(most of the code stolen directly from the BIKI):

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

//nitroboost.sqf

//Default stuff given to script via addaction

_vehicle = _this select 0;

_caller = _this select 1;

//Makes sure the caller is also the driver.

if (_caller !=driver _vehicle) exitWith {};

//Actual "script" (courtesy of BIKI) -> _speed variable is how much speed is added.

_vel = velocity _vehicle;

_dir = direction _vehicle;

_speed = 20;

_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2)];

Play around with the _speed variable and see what you'll get. Untested, but should work? biggrin_o.gif

Regards,

Wolfrug

Share this post


Link to post
Share on other sites

tnx alot ....Wolfrug

i dryed and didnt get it to work.... sad_o.gif

i also included a cool V8 engine sound

Share this post


Link to post
Share on other sites

Any chance we could get a DPV/FAV version of this? With a M249/240 in the passenger seat next to the driver and a third seat up and behind them with a M2/Mk19? As well as AT4s up on the rail to the left of the driver and right of the passenger?

That would be awesome.

Like this:

http://www.cucv.net/fav/DPV_closeup1.jpg

Or Like this:

http://www.tomtownsend-toyland.com/toyland/FAV1.JPG

Share this post


Link to post
Share on other sites

yes i do more variants.....like the chenowth...but first need to fix some issues, by this fiction civil versions xmas_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]tnx alot ....Wolfrug

i dryed and didnt get it to work....

Yep sorry, my code didn't work, so I tested it a bunch of times and this seems to work a bit better:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//nitroboost.sqf

//Default stuff given to script via addaction

_vehicle = vehicle (_this select 0);

_caller = _this select 1;

//Makes sure the caller is also the driver, and that the vehicle isn't upside down.

if ((_caller !=driver _vehicle) OR (vectorUp _vehicle select 2 < 0)) exitWith {};

//Actual "script" (courtesy of BIKI) -> _speed variable is how much speed is added. _count is for how many hundreds of a second the nitro is run: presently 1 second.

_vel = velocity _vehicle;

_dir = direction _vehicle;

_speed = 10;

_count = 100;

while {_count > 0} do

{

_dir = direction _vehicle;

_vel = velocity _vehicle;

_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2) - 1];

_count = _count - 1;

sleep 0.01;

};

_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2) - 1];

If nothing else, random people can use it in their own missions and such anyway. smile_o.gif It's unoptimized and such, but for fun and used only by players it should work: also, I suck at math, so if you happen to find yourself flying off a cliff, you'll notice gravity..ahem..doesn't seem to have THAT much of an effect on you wink_o.gif (change the last element in the setVelocity array, -1 right now, to try to create more gravity in situations like that: note that too low will increase your chance of getting splatted in uphills whistle.gif )

biggrin_o.gif It's a bunch of fun driving around with nitro's on in your buggy's! Wooh! Also, here's a more advanced version, which includes a timer (currently set at 10 seconds) during which the nitro is unavailable, as well as making it consume more fuel. NOTE: in the end, you'll need to write in the proper path to the script (i.e. "JOHNS_BUGGY\nitroboost.sqf") for the addaction to work.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">//nitroboost.sqf

//Default stuff given to script via addaction

_vehicle = vehicle (_this select 0);

_caller = _this select 1;

_id = _this select 2;

//Makes sure the caller is also the driver, and that the vehicle isn't upside down.

if ((_caller !=driver _vehicle) OR (vectorUp _vehicle select 2 < 0)) exitWith {};

//Advanced: removes action upon use for a cooldown period

_vehicle removeAction _id;

//Actual "script" (courtesy of BIKI) -> _speed variable is how much speed is added. _count is for how many hundreds of a

second the nitro is run: presently 1 second.

_vel = velocity _vehicle;

_dir = direction _vehicle;

_speed = 10;

_count = 100;

//Loop -> also subtracts fuel.

while {_count > 0} do

{

_fuel = fuel _vehicle;

_dir = direction _vehicle;

_vel = velocity _vehicle;

_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2) - 1];

_vehicle setFuel (_fuel - 0.0001);

_count = _count - 1;

sleep 0.01;

};

_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+ (cos _dir*_speed),(_vel select 2) - 1];

//Cooldown period (currently 10 seconds)

sleep 10;

_vehicle addAction ["Nitro boost", "nitroboost.sqf"];

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
Sign in to follow this  

×