Home   Help Search Login Register  

Author Topic: Object Height  (Read 1514 times)

0 Members and 1 Guest are viewing this topic.

Phantom

  • Guest
Object Height
« 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?

Knowlife

  • Guest
Re:Object Height
« Reply #1 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

Phantom

  • Guest
Re:Object Height
« Reply #2 on: 25 Mar 2003, 14:44:33 »
is there one that doesn't require an sqs file?

Knowlife

  • Guest
Re:Object Height
« Reply #3 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...
« Last Edit: 25 Mar 2003, 14:48:57 by Knowlife »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Object Height
« Reply #4 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

« Last Edit: 11 Mar 2007, 11:51:52 by bedges »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

SharkDog

  • Guest
Re:Object Height
« Reply #5 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.

Offline Ruffneck

  • Members
  • *
Re: Object Height
« Reply #6 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  ;)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Object Height
« Reply #7 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
I know a little about a lot, and a lot about a little.

Offline Ruffneck

  • Members
  • *
Re: Object Height
« Reply #8 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...