Jump to content

Photo
- - - - -

destrType = "DestructWreck";


  • Please log in to reply
22 replies to this topic
Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 17 June 2009 - 17:18 #1

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
Posted Image

rocket
rocket

    BI Developer

  • 648 posts

  • Joined: 11-June 2007

Posted 24 June 2009 - 02:21 #2

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.
"He will come to death. An image of the splendor of the kings of men in glory, undimmed before the breaking of the world."

TeRp
TeRp

    Master Sergeant

  • Members
  • 644 posts

  • Joined: 25-March 2003

Posted 24 June 2009 - 11:41 #3

There is also a setting
wreck="...";

You might wanna try this. :)

Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 24 June 2009 - 12:44 #4

@TeRp

where did you found this?
Posted Image

TeRp
TeRp

    Master Sergeant

  • Members
  • 644 posts

  • Joined: 25-March 2003

Posted 24 June 2009 - 12:53 #5

@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

Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 24 June 2009 - 17:00 #6

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.
Posted Image

Maddmatt
Maddmatt

    Chief Warrant Officer

  • Members
  • 3798 posts

  • Joined: 17-January 2004

Posted 25 June 2009 - 00:53 #7

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.

Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 25 June 2009 - 12:50 #8

@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.
Posted Image

marco-polo-iv
marco-polo-iv

    Sergeant

  • Members
  • 129 posts

  • Joined: 10-June 2004

Posted 11 July 2009 - 11:34 #9

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, 11 July 2009 - 11:36.

War is the continuation of the policy with other means

-)rStrangelove
-)rStrangelove

    Sergeant Major

  • Members
  • 1760 posts

  • Joined: 24-January 2002

Posted 13 July 2009 - 11:12 #10

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
Posted Image
Spoiler

Waxbutter
Waxbutter

    Lance Corporal

  • Members
  • 41 posts

  • Joined: 09-October 2008

Posted 15 November 2009 - 18:53 #11

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, 15 November 2009 - 20:21.


gms
gms

    Sergeant

  • Members
  • 106 posts

  • Joined: 13-November 2007

Posted 15 November 2009 - 21:14 #12

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

Waxbutter
Waxbutter

    Lance Corporal

  • Members
  • 41 posts

  • Joined: 09-October 2008

Posted 16 November 2009 - 13:28 #13

indeed gms, good job on the an-2m !!

csj
csj

    Master Gunnery Sergeant

  • Members
  • 1070 posts

  • Joined: 25-October 2004

Posted 18 December 2009 - 01:52 #14

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?
I am not stuck in the 60's and 70's. I choose to live there." Bring back the MICRO and the MINI :hyper:
Posted Image

Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 20 December 2009 - 18:55 #15

@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.
Posted Image

T_D
T_D

    CWR² Developer

  • Members
  • 552 posts

  • Joined: 30-December 2006

Posted 20 December 2009 - 20:12 #16

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

Thread Starter
-FRL-Myke
-FRL-Myke

    Moderator

  • 6571 posts

  • Joined: 27-May 2007

Posted 20 December 2009 - 20:15 #17

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.
Posted Image

T_D
T_D

    CWR² Developer

  • Members
  • 552 posts

  • Joined: 30-December 2006

Posted 21 December 2009 - 02:40 #18

no I am not talking about the usual LandContact points. I am talking about similar points in the WreckLOD. Here a picture:
http://img85.imagesh...86/wrecklod.jpg

Edited by T_D, 21 December 2009 - 02:42.


csj
csj

    Master Gunnery Sergeant

  • Members
  • 1070 posts

  • Joined: 25-October 2004

Posted 21 December 2009 - 02:47 #19

Thankyou very much - that worked.

Which tool did you use to view in olod ?
I am not stuck in the 60's and 70's. I choose to live there." Bring back the MICRO and the MINI :hyper:
Posted Image

T_D
T_D

    CWR² Developer

  • Members
  • 552 posts

  • Joined: 30-December 2006

Posted 21 December 2009 - 14:34 #20

My own ;)