Home   Help Search Login Register  

Author Topic: units in buildings  (Read 552 times)

0 Members and 1 Guest are viewing this topic.

eversman

  • Guest
units in buildings
« on: 26 Jun 2003, 21:37:09 »
I have one guestion.
What is the command or something to move unit in to specific place in a building???

Black Operative

  • Guest
Re:units in buildings
« Reply #1 on: 26 Jun 2003, 23:24:24 »
huh?  ???
I can only think of getpos'ing and setpos'ing, assuming that you are talking about placing a unit on different floors. Well in this case, code goes like this:

In the unit's init field put:
this setpos [getpos this select 0, getpos this select 1, (getpos this select 2)+x ]

where x is the height the unit should be relocated to. I think for most buildings something like 3 or 4 is suitable.


BTW:
? not (this == right answer) : eversman explain [question, further detail please]  ;)
« Last Edit: 26 Jun 2003, 23:25:09 by Black Operative »

eversman

  • Guest
Re:units in buildings
« Reply #2 on: 26 Jun 2003, 23:32:38 »
Hey Black Operative you are very smart man :thumbsup:
thanks  :cheers:

Wolf

  • Guest
Re:units in buildings
« Reply #3 on: 27 Jun 2003, 00:10:22 »
For setpos all you need is this

This setpos[getpos this select 0, getpos this select 1, 4]

Works the same as decribed above, 4 is meters off the ground.
Also, if this is a non editor added building, EI, came with teh island in question, you can also simply make a waypoint on the building for the unit, and a new option becomes availeble, it shows up as position. and you select from several numbers, trial and error is about the only way to use it though until you find the right location in the building.

1st method would be used if you wanted him to start in teh building from the begining of the mission.

2nd would be for if you wanted him to move into it after it started.

Black Operative

  • Guest
Re:units in buildings
« Reply #4 on: 27 Jun 2003, 09:48:57 »
Hey Black Operative you are very smart man :thumbsup:

Thanks... (actually I'm not  ::)  ;))


Question about Wolf's post:
Is it possible to somehow create more than one attached waypoint on the same building?