Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
philcommando

damaged detailing

Recommended Posts

I am not sure if it has been posted b4, but thot to share a working example based on my matrix APU model for those who may be doing a search for something like this. Dont worry if it seem complicated, actually its only 3 lines of codes but i use more lines here to help u understand more clearly ( i hope)

Background info:-

-----------------

1. 'Damaged' textures are eg:-wounds and burnt textures on the addon.

2. Such textures are applied onto hidden selections, and when a 'fired' event occurs, such selections will be rendered to show the texture. Prior to that it will be invisible.

How to:-

-----------

1. Select the parts that u think needs to show damaged..can be part or whole in the main LOD..(pilot view optional)

2. copy the selected parts/vertices and then paste and appy the texture, no need to shift it but very importantly u must name it!

3.In the config, u must write the cfgmodel, nothing special but u must name the selected part/parts, eg:-

class CfgModels

{

class default {};

class Man: Default {};

class PCapu7: Man

{

sectionsInherit="Man";

sections[]=

{"whole", "glass1"}; // this are the damage parts };

};

4. In the cfgvehicles, make sure u again u have this line to tell the engine which part is hidden:-

hiddenSelections[] = {"whole", "glass1"};

:- ingame, these parts will be hidden, thats why u have to make a copy of the selected parts so that u can still see the undamage part.

5.Last thing to do is to make use of the class eventhandler to tell the ofp engine when to show the selected damage parts:-

class eventhandlers

{

damage="(_this select 0) setObjectTexture [0,""\PCAPU\win2.paa""]";

killed=" (_this select 0) setObjectTexture [0,""\PCAPU\burnt.paa""]";

};

Once the killed or damage event occurs, the selected parts will be visible and replace the undamage parts, making the undamage parts invisible.

This method's drawback is that it can only be used for Single play and not MP as it uses the eventhandler, known to be MP unfriendly, however i am sure scripts could be use byway of addaction. Another way could be to use bis config 'dammage[]=' ,but i have not tested that method yet so i cant comment on it. All the best! smile_o.gif

Share this post


Link to post
Share on other sites

PS:- As a further developement:-

Analysis:-

---------

1. Using hidden selections, the selected damage parts will be invisible in game.

2. It would be possible to create an entire new damaged structure with no or at least use the main geometry LOD for collision detection.

3. When the main model is damage, it will 'crumble' to the damage model.

Happy testing! smile_o.gif

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  

×