Jump to content
Sign in to follow this  
[frl]myke

destrType = "DestructWreck";

Recommended Posts

Probably this ones needs a developer to give a final answer to it:

Anyone already found out how to implement this option that destoyed planes are replaced with theyr wreck model?

What i know so far:

In the planes config, it needs this line:

destrType = "DestructWreck";

Of course it needs a wrecked p3d also.

In the cfgVehicles, the wreck has to defined like any other vehicle:

class PlaneWreck;
class GLT_Falcon_MRWreck: PlaneWreck {
	scope = 1;
	class Armory {
		disabled = 1;
	};
	model = "\glt_f16\wreck\GLT_FalconWreck.p3d";
	typicalCargo[] = {};
	irTarget = 0;
	transportAmmo = 0;
	transportRepair = 0;
	transportFuel = 0;
	transportSoldier = 1;
	class Eventhandlers {
	};
};

So far the destroyed plane disappears into ground but no wreck is created. Since there is no model.cfg around to study i can't tell if it needs something there too.

Also in the scripts i didn't found anything helpful or i missed it completely.

I know, without the tools out it's hard to say but i hope a developer will stick his nose in and give some hints. :D

Share this post


Link to post
Share on other sites

Is there a DestructWreck class in ArmA2? I'm still waiting for my copy to arrive, so not sure.

What we've done in the past to achieve this, is to add an event handler on "Killed" for the vehicle, so that when it is killed, you place a new object in that same location, with it's direction, and then delete the crashed object. Pretty straightforward. Although make sure it runs on the server only, or in multiplayer, you'll have chaos.

Share this post


Link to post
Share on other sites

There is also a setting

wreck="...";

You might wanna try this. :)

Share this post


Link to post
Share on other sites
@TeRp

where did you found this?

The Predator UAV (class MQ9PredatorB) uses that one:

wreck="MQ9PredatorWreck";

Looks like it is a reference to the wreck class.

I found it while I was reading through the configs, trying to find some new commands ;)

Haven't tried it myself yet though, still missing a wreck model.

If you have any success, please let me know :)

Cheers TeRp

Share this post


Link to post
Share on other sites

No success. There must be something more we didn't found yet. When set to DestructWreck the plane disappear into ground but no wreck is created. I'll keep the eventHandler for now.

Share this post


Link to post
Share on other sites

Maybe the game just does it based on the class name. Use the same classname as the aircraft just with "wreck" on the end, like the BIS aircraft.

I don't think the "wreck" config entry is used, as not all aircraft have it.

This is just a guess.

Share this post


Link to post
Share on other sites

@Maddmatt

thanks but sadly already had this idea since i've started with experimenting. The planes classname is

class GLT_Falcon_MR

and therefor the wrecks classname is

class GLT_Falcon_MRWreck

This was the first guess that it looks for the similar wreck classname with added "Wreck" at the end.

Share this post


Link to post
Share on other sites

all Helos and Planes are used a new LOD in p3d with a proxy.

i don't know the lod is named

exmaple:

BIS UH1Y lod 2.1e+016 proxy UH1YWreck

regreetz

Marco

Edited by Marco-Polo-IV

Share this post


Link to post
Share on other sites

We need this for trees so that they disappear into the ground when run over by tanks / explosion blasts. An area full of fallen trees is totally unplayable due to the AI seeing through it without problems. :P

Share this post


Link to post
Share on other sites

if you follow Myke's instructions and ...

add a LOD called "wreck" in Yourmodel.p3d and make a proxy of YourmodelWreck.p3d in it.

in class CfgVehicles also add :

class EventHandlers

{

fired = "_this execVM ""CA\Data\ParticleEffects\SCRIPTS\fired.sqf""";

killed = "_this execVM ""CA\Data\ParticleEffects\SCRIPTS\killed.sqf""";

};

At the end of your config put :

enum

{

=2,

destructengine=2,

destructdefault=6,

destructwreck=7,

destructtree=3,

destructtent=4,

stabilizedinaxisx=1,

stabilizedinaxisy=2,

stabilizedinaxesboth=3,

destructno=0,

stabilizedinaxesnone=0,

destructman=5,

destructbuilding=1

};

then it prolly should work :-)

Good luck and thanx for sharing the info.

Edited by Waxbutter

Share this post


Link to post
Share on other sites

True. That is working well on the an-2 addon. I made it but did't know about this thread, sorry :)

Share this post


Link to post
Share on other sites

I have the wreck working to a point but

when the wreck model appears it duckdives and just leaves the tail

pointing up fom the ground.

I have land contact lod, geo lod the usual.

Any ideas how to rectify?

Share this post


Link to post
Share on other sites

@CSJ

Good question. I'm stumbling into the same issue. Previously i've worked with a script which was called with an eventHandler. Worked like a charm. Now i was implementing the A2 built-in Wreck system and have exactly the same problem as you have.

Is there some reference around about that enum codeblock? Would be interesting to know what does it mean and what the numbers do.

Share this post


Link to post
Share on other sites

Do you have a sort of LandContact points in the WreckLod? BIS models do at least.

Share this post


Link to post
Share on other sites
Do you have a sort of LandContact points in the WreckLod? BIS models do at least.

Yes, Landcontact points are present but they are not taken into account when the wreck model appears. Means that it ignores those points completely.

Share this post


Link to post
Share on other sites

Thankyou very much - that worked.

Which tool did you use to view in olod ?

Share this post


Link to post
Share on other sites
Do you have a sort of LandContact points in the WreckLod? BIS models do at least.

yup - thanks anyway

Share this post


Link to post
Share on other sites

Sorry if I dig this out.

I edited all as described - but the model keeps fall through.

BUT: I got instead there only the crate of the destructed model without the model itself and without fire.

Furthermore the normal model turns on the back and THEN falls through the ground.

Has anybody any idea, what I did wrong - or where I could search for the error:

Cfg, modelfile or..?

EDIT:

This destrType = "DestructEngine"; made it better...

Fire and crate is made alone with that (!), too.

The only thing that still doesn´t work, is the exchange of the models, to have a second model as wreck.

Edited by moviemaker100
got something out

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  

×