Jump to content
Sign in to follow this  
Trenchfeet

dammageHalf & dammageFull on Planes

Recommended Posts

hey has anyone seen this config feature ( it swaps damage textures with the origionals) work on planes? im not sure if its me  crazy_o.gif  or if its not able to work on planes?

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

{

\ECA_P-51D\glass1.paa,\ECA_P-51D\glass2.paa,

};

dammageFull[]=

{

\ECA_P-51D\glass2.paa,\ECA_P-51D\glass3.paa,

};

thats what ive got int the config and its in the  class CfgVehicles section

Share this post


Link to post
Share on other sites

Its you bud biggrin_o.gif Nah seriously I tried it with a full damage skin for the harrier and A4 ags ago, but it never worked. Helos and cars are aout all I could get it to work on. Kinda sucks cos otherwise you're left with the ugly crumpled mess the engine creates. Only other alternative is to swap planes.. which also sucks cos the screen jerks then you've got to remove the crew and passengers from one plane to the next. Entirely mesy.. Ive abandoned any further research into it biggrin_o.gif

Share this post


Link to post
Share on other sites

Thanks klink biggrin_o.gif

I suppose the other way is just a script running in the back ground that detects the vehicles damage and set the required tex.

But i didn't want another script running crazy_o.gif

Share this post


Link to post
Share on other sites

I played around with it a while ago and didn't work for me.I think because you can't have the selection used for anything else.Ex: hidden selection,animation etc...

Might as well make it a hidden selection and change the texture and like you said that you didn't want another script running.Could go even further tho and make use of a damaged selection and damage textures

Share this post


Link to post
Share on other sites

I was thinking about doing this on a certain addon: make up

some alpha-bit textures that show 'holes' and superstructure

and place them as hidden selections on the wings and

fueslage. Then, hide them and monitor the damage from a

script. When the damage is at a certain point, turn the

textures on (with some random-ness also). You'd still have the

'normal' skin underneath, but with the damage overlaid.

If you're worried about script overhead, you could do this

every second or so, rather than check 25 times a second.

Share this post


Link to post
Share on other sites

That works. The Frank is having some sections added that are hidden and exposed according to damage. This is related to a damage script I have running which measures the amount of damage the plane receives.With several hit points in the model itself damage debris flies away from the plane as well.

The downside of this is the ofp planes receive damage when taking off and landing which is rather silly in most normal takeoff/landing situations.

Even so by checking the damage at say >=0.002 I have been able to limit the debris effects on normal take off and landing.

To measure how much damage the plane took I set up a script that measured the before and after damage when the plane (empty) was hit by a M16 round. I felt that would be the lightest round to cause damage.

Of course if the hit eventhandler worked we might be able to measure damage a lot more realistically.

Share this post


Link to post
Share on other sites

The Hawker Typhoon model already has a damage script with it.

Debris flying off with medium damage leading upto a large portion of the wing with heavy damage.

It is only basic on the Typhoon but if you wanted virtually the whole plane could disintergrate in a ball of flames.

Share this post


Link to post
Share on other sites
The downside of this is the ofp planes receive damage when taking off and landing which is rather silly in most normal takeoff/landing situations.

Could you check on the plane height and/or on the gear

up/down status - maybe even on the z-component of the

plane velocity?

Share this post


Link to post
Share on other sites

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

dammageHalf[]=

{

\ECA_P-51D\glass1.paa,\ECA_P-51D\glass2.paa,

};

dammageFull[]=

{

\ECA_P-51D\glass1.paa,\ECA_P-51D\glass3.paa,

};

Syntax is:

original texture, half dammaged texture

original texture, fully dammaged texture

not

original texture, half dammaged texture

half dammaged texture, fully dammaged texture

(at least it was when I've been working on some OFP addons... and it was half a year ago ;)

Make sure glass parts are defined in CfgModel section of the config...

Share this post


Link to post
Share on other sites

Thanks guys for the extra info,

I was thinking of doing that same thing Footmunch, (apart from lazyness biggrin_o.gif ) but it looks like i'll have to do something now if i want a different set of glass textures

Quote[/b] ]With several hit points in the model

I dont think i'll do this as most of the time you proberly wouldn't see it happen as the target would be too far away

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  

×