OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Stue on 25 May 2009, 04:46:31

Title: heres a suggestion for
Post by: Stue on 25 May 2009, 04:46:31
the sake of reality

how about someone make a pack of fallen trees  :good:
Title: Re: heres a suggestion for
Post by: Walter_E_Kurtz on 26 May 2009, 16:03:43
What do you want them for?

It is possible to knock individual trees over by using setDammage 1 (http://www.ofpec.com/COMREF/index.php?action=details&id=292).

1. Use an editor update (Mikero's Editor 103 (http://www.ofpec.com/ed_depot/index.php?action=details&id=158&game=OFP) is probably best) - this allows you to place objects in the Mission Editor that are normally hidden by the game engine.

2. Place the player as a unit to view the action.

3. Now you can place all sorts of inanimate objects. They are under 'Side: Empty'. When using Mikero's, trees are listed under 'EU - Trees'.

4. Write the following in the initialization line of the tree:
Code: [Select]
this setPos [(getPos this select 0), (getPos this select 1), 1]; this setDammage 1The setPos ... getPos line raises the trunk of the tree 1 metre of the ground.
The setDammage 1 line fells the tree.

Note: the tree falls in the direction it is heading in the Mission Editor. With an Azimuth of 0 it falls North, 90 is East.


Issues: because the tree has been destroyed, it is rendered insubstantial: it can be walked or shot through. I guess this could be got round by placing more trees and setPosing them under the ground so only their tops show, or by mixing bushes / fences with it.