OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Phantom on 25 Mar 2003, 14:28:30

Title: Object Height
Post by: Phantom on 25 Mar 2003, 14:28:30
I'm trying to pile up a bunch of ammo crates, how do i change the height of it so to stack them up?
Title: Re:Object Height
Post by: Knowlife on 25 Mar 2003, 14:40:13
Like this:

Put this the init field of the crate: [this,(getpos this),**PUT THE HEIGHT YOU WHANT HERE**] exec "height.sqs"
And the following in your mission folder:

height.sqs
Code: [Select]
_object = _this select 0
_objpos = _this select 1
_height = _this select 2
_object setpos [(_objpos select 0),(_objpos select 1),(_objpos  select 2) + _height]
exit
Title: Re:Object Height
Post by: Phantom on 25 Mar 2003, 14:44:33
is there one that doesn't require an sqs file?
Title: Re:Object Height
Post by: Knowlife on 25 Mar 2003, 14:48:09
Well, yes. Put this in the init field:

_object setpos [(this select 0),((getpos this) select 1),((getpos this)  select 2) + **PUT THE HEIGHT YOU WHANT HERE**]

But i'm not sure if it works...
Title: Re:Object Height
Post by: Chris Death on 25 Mar 2003, 15:03:43
Just replace _object with this or with the object's name

:edit - huh - just been reading that again:
Code: [Select]
this setpos [(gepos this select 0),(getpos this select 1),height_you_want]
That's the right code now

~S~ CD

Title: Re:Object Height
Post by: SharkDog on 25 Mar 2003, 16:51:22
errr i think he will understand this better.

in init field;
this setpos [getpos this select 0, getpos this select 1, #]



#= height in meters, you can choose whatever you want.
Title: Re: Object Height
Post by: Ruffneck on 10 Mar 2007, 19:03:25
this setpos [getpos this select 0, getpos this select 1, 250] FTW!!!

But I cant seen to put objects ontop of roofs. I once did it with an M2 machine gun but it wouldnt stay where I moved it to.

I want to put some things on the roof of Arcadia on the map. THere is a hotel there. Good for chopper landings  ;)
Title: Re: Object Height
Post by: Planck on 11 Mar 2007, 01:21:17
Don't you think this topic is getting a little long in the tooth?

2003 was a while ago now...........4 years!!!



Planck
Title: Re: Object Height
Post by: Ruffneck on 11 Mar 2007, 12:17:29
Yeah I guess, a golden oldie. I searched and added to this one instread of making a new one...