OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: mgkaplan on 26 Mar 2003, 07:18:31

Title: Digging up objects.
Post by: mgkaplan on 26 Mar 2003, 07:18:31
I was reluctant to post this because I'm sure it has been posted before, but I couldn't find where. When objects are placed inside buildings (ie. cars in garages on nogova) they are always a little underground. Another example would be barrels not sitting on the ground, but in it. How could I fix this problem?

Sorry for the repetition.




Title: Re:Digging up objects.
Post by: Artak on 26 Mar 2003, 07:23:24
I can't think of any other way than setpossing.

Say you have a barrel you want to raise a bit. You'd name the barrel as barrel1 and type in it's init field:

barrel1 setpos [getpos barrel1 select 0, getpos barrel1 select 1,(getpos barrel1 select 2)+0.1]

That will raise the barrel for 10 centimeters
Title: Re:Digging up objects.
Post by: Phantom on 26 Mar 2003, 10:52:32
or change barrel1 to this, and that way it'll just d it for that object automatically
Title: Re:Digging up objects.
Post by: xero on 26 Mar 2003, 22:34:00
I think the reason is because the cars are sitting on the floor and the floor of the garage is a slightly raised. Like the effect you get on docks... you run onto them sometimes and sink into the concrete.  ;)
Title: Re:Digging up objects.
Post by: Sol Fire on 26 Mar 2003, 22:46:24
i did that once.. up to my head in Concrete so i laid down waited for enemy crawled out of the Concrete and wasted them all!!

anyway SetPos should do it fine just "Trial & Error" untill its perfect
Title: Re:Digging up objects.
Post by: mgkaplan on 27 Mar 2003, 02:07:10
Thanks allot! It works great. To bad there isn't simpler way.