OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: OFPWW2 on 13 Jul 2004, 05:29:43

Title: I need to set a height on an object
Post by: OFPWW2 on 13 Jul 2004, 05:29:43
i need to set the height of an object and i would appreciate the line for it thanks alot...
Title: Re:I need to set a height on an object
Post by: j-man on 13 Jul 2004, 06:58:05
Put the following into the objects init field:

object setpos [(getpos this select 0), (getpos this select 1), XXX]

replace XXX with whatever height you want.
Title: Re:I need to set a height on an object
Post by: OFPWW2 on 13 Jul 2004, 18:54:05
thank you jman..
Title: Re: I need to set a height on an object
Post by: Ruffneck on 14 Mar 2007, 13:50:48
Hi,

Is it the same to place an object ontop of a building??

I tried and it does work to some degree but it locks itself to one place and no matter where I place it, it stays in the same location.

Basically I was trying to place a 50.cal on a roof at Arcadia, I set the height to 260 I think but like I said I cant place it where I want... :dunno:
Title: Re: I need to set a height on an object
Post by: bedges on 14 Mar 2007, 14:14:06
yes, it's exactly the same, however some objects are affected by gravity, and so when setpos'd into the air will begin falling. soldiers fall quite slowly, tanks and other vehicles fall almost instantly. other objects are not affected by gravity at all and stay where they are setpos'd, even if it is in mid-air.

if this is happening to the 50.cal, experiment with the height value until it looks like it is on the roof.
Title: Re: I need to set a height on an object
Post by: Ruffneck on 14 Mar 2007, 14:23:07
Thanks, I can get it to stay on the roof. I think the correct height was 260 or something but the thing is it would spawn where I wanted it to...

Its a square roof and I wanted to put a 50.cal and some sandbags but the 50 is like 10 meters behind and like 3 to the left of where I want it to be.
No matter where I placed it in the editor it always goes back to that same spot  :blink:
Title: Re: I need to set a height on an object
Post by: karantan on 14 Mar 2007, 15:41:09
Some buildings do not 'allow it' to place the objects (exsactly) where you want them to be, because of their/such moddeling I guess. Also some mods (ECP is well known by this) have a 'habbit' to misplace some in the editor placed objects (if they're not placed with ECP and later played with ECP for instance), sandbag is one of them, but not 50.cal mgun thou ,,, and ,,, height of 260 ,,, are you sure, that's 260 meters dude ...

EDIT: Hm, Arcadia ,,, this is for ArmA, yes? Wrong forum then ...
Title: Re: I need to set a height on an object
Post by: Ruffneck on 14 Mar 2007, 17:31:46
Ok, thanks for clearing that up. Pitty though, I really had something good in mind...
Title: Re: I need to set a height on an object
Post by: h- on 15 Mar 2007, 08:36:41
Karantan is right, don't post ArmA related questions in OFP boards (good spotting, I'm going blind I guess.. :scratch:)..

Someone with ArmA might be able to help you if you post your questions in the correct place.