Jump to content
Sign in to follow this  
RozekPoland

making trees disappear when destroyed

Recommended Posts

I'm looking for a solution to make a tree disappear when it's destroyed or ran over by car/tank. I was experimenting with destructiontype on both config and the model of the tree but none of them was giving me the effect I'm looking for. Any idea?

Share this post


Link to post
Share on other sites
I'm looking for a solution to make a tree disappear when it's destroyed or ran over by car/tank. I was experimenting with destructiontype on both config and the model of the tree but none of them was giving me the effect I'm looking for. Any idea?

I think it will work if you put class eventhandlers in the config

Something like:

		class eventhandlers
	{
	killed = "[_this select 0] exec {\YourAddonName\delete_object.sqs}";
	};
};

delete_objects.sqs

;***************************************
;Delete Object Script By Nikiller v0.9b
;Note: Place a game logic named server
;contact: nikillerofp@hotmail.fr
;[objectName] exec "scriptname.sqs"
;***************************************

if (local server) then {} else {goto "ende"}

_o = _this select 0

~5
deleteVehicle _o

#ende

exit

I am not addon maker then I don't guarantee it will work.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

Hello,

The script you have provided works for trees placed in editor but it does not work for trees already existing on the islands. I have created a config for some trees and included the script in EventHandler Killed but with no effect.

Anyway, I really appreciate your help :)

Share this post


Link to post
Share on other sites

hi,

Hello,

The script you have provided works for trees set in editor but it does not work on trees on the island. I have modified the config of these trees (they are additional objects - Berghoff Natural Pack 3) but with no effect.

Anyway, I really appreciate your help :)

Did you add a class evenhandlers in the config.cpp?

cya.

Nikiller.

Share this post


Link to post
Share on other sites

hi,

IIRC evenhandlers do not work on WRP/Visitor placed objects.

Ho ok it's trees included with island. Sorry I didn't understood. I don't think it is possible to delete object included with the island.

cya.

Nikiller.

Share this post


Link to post
Share on other sites

A tree as a model has its own destructiontype that is configureable in O2. Is there any way to create a new kind of destructiontype like DestructMan, DestructBuilding etc.? I have studied the config but I haven't found any example.

Share this post


Link to post
Share on other sites

What about the destruction type that tents, bushes and other similiar objects have? If done correctly, you could probably have the trees sink under ground. Though it might look kinda funny, it's probably the best you can have without switching to editor placed trees instead and using script based solutions like Nikiller suggested.

Share this post


Link to post
Share on other sites

destructtent causes that a tree falls like a bush but it's still visible on the ground,

dammage bush does not work on a tree.

still not solution...

Share this post


Link to post
Share on other sites
destructtent causes that a tree falls like a bush but it's still visible on the ground

You need to modify the tree models so that they're partially under ground to begin with. That would cause them to sink all the way down I'd imagine.

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  

×