Home   Help Search Login Register  

Author Topic: Start in a tower  (Read 2966 times)

0 Members and 3 Guests are viewing this topic.

Offline vaff

  • Members
  • *
  • I'm a llama!
Start in a tower
« on: 11 Feb 2007, 15:52:20 »
How do you get a unit to start in a tower????

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Start in a tower
« Reply #1 on: 11 Feb 2007, 16:05:59 »
I noticed in ArmA that you can place the unit over the tower in just the right position and indeed he would be placed in the tower. This differs from OFP where you had set the height of the unit. I'll try and take a screen shot of a good placement and post it here.

See attached Image
« Last Edit: 11 Feb 2007, 18:10:19 by hoz »
Xbox Rocks

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re: Start in a tower
« Reply #2 on: 11 Feb 2007, 19:20:05 »


you could specifically position a unit in a building by placing the unit in the building and then using sepos to adjust the height

eg Place the following code in the unit's INIT field
this setpos [getpos this select 0, getpos this select 1, Z]

where Z is the height, which can be a negative number or a positive number

alternatively, check the following wiki entry

http://community.bistudio.com/wiki/buildingPos

Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Start in a tower
« Reply #3 on: 12 Feb 2007, 17:50:10 »
As the previous gentleman stated, building pos will work for you.  Look up the building ID in the editor, and the following line of code will work"

Code: [Select]
this setpos  ((position this nearestobject 12345) buildingpos 4);
Substitute 12345 with your tower's building ID.  You also have to determine the correct building position.  In-game, building positions are shown as 1 through X.  But in code, they are 0 to X-1, so adjust your desired buinding pos accordingly.

When using this to put units on top of buildings where there are no guard rails, you might want to use "unit disableAI "TARGET"" command which which prevents him from wanting to engage targets and run off the roof to his death.  The unit will still shoot enemies, but he won't run off to ENGAGE.  If you want him to not move at all then do this also:  "unit disableAI "MOVE"".
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: Start in a tower
« Reply #4 on: 12 Feb 2007, 18:22:45 »
Why use the building pos and set unit height command when you can just drop the unit in the tower? Also placing units directly on top of buildings works the same way. I can see using the buildingpos command for placing a unit on a particular floor of a building. What am I missing?
Xbox Rocks

Offline Jimboob

  • Former Staff
  • ****
Re: Start in a tower
« Reply #5 on: 13 Feb 2007, 10:42:06 »
I noticed in ArmA that you can place the unit over the tower in just the right position and indeed he would be placed in the tower.

You could do the same in OFP, although it was always easier to do using the setPos and setting the height
« Last Edit: 13 Feb 2007, 11:28:31 by bedges »