OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: KingBuffalo on 26 May 2005, 14:14:11

Title: Place object below surface
Post by: KingBuffalo on 26 May 2005, 14:14:11
Is it possible to place an object just below the surface but still have it usable?  For example, I am trying to place a med tent, just below the surface, so that a player can run to a spot and heal, without the med tent being seen.
Title: Re:Place object below surface
Post by: GI-YO on 26 May 2005, 14:18:46
you can do that with this little line of code

this setpos [(GetPos this select 0), (GetPos this select 1), -1]

The -1 part at the end can be changed to any height, you might have to experiment so the tent is not invisibel.

happy mission making

GI-YO
Title: Re:Place object below surface
Post by: KingBuffalo on 26 May 2005, 16:57:35
thanks, I will give this a try!
Title: Re:Place object below surface
Post by: THobson on 26 May 2005, 18:24:12
It will work for some objects but not others.  I wanted to put an empty boat underground (I just wanted the noise).  It can be done but a few seconds into the mission it just pops out again.