Home   Help Search Login Register  

Author Topic: Putting enemies inside buildings and on different floors  (Read 2000 times)

0 Members and 1 Guest are viewing this topic.

Offline Dj Tano

  • Members
  • *
Hey guys,

ive found this really great building in sahrani wich would be perfect for a house clearing mission, but i seem only to be able to put enemies ON buildings, instead of IN them... anybody knows wht i have to do?

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: Putting enemies inside buildings and on different floors
« Reply #1 on: 22 Mar 2007, 20:21:39 »
Very common problem.  In fact I made a joke blooper cutscene (i'll put it up on the forum later) about that.  In the init line for your unit, put in "this setpos (nearestbuilding pos 3)" i think.  I think that syntax is right. Check the old OFP forums on ofpec.com too. 

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Putting enemies inside buildings and on different floors
« Reply #2 on: 22 Mar 2007, 20:37:00 »
There's a script, made by Tophe, which could be helpful for you:

http://www.armaholic.com/page.php?id=879


:EDITH:
saw it only at the second sight...there's also a random house patrol script by the same author there:

http://www.armaholic.com/page.php?id=936

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: Putting enemies inside buildings and on different floors
« Reply #3 on: 23 Mar 2007, 02:10:29 »
i played around with the arma hotel and that code... worked except with all the floors the available in the hotel, the unit positions went beyond 180... so it required alot of patience setting the units in thier desired positions. I also noticed  that after adding about 15/20 units in the hotel, the game began suffer heavy lag - dunno why*  :confused:

Code: [Select]
unit setpos  ((position unit nearestobject 172902) buildingpos 184);
unit setdir getdir unit +10;

*I know nothing about anything
just setpos & forgetpos!

Offline satexas69

  • Members
  • *
Re: Putting enemies inside buildings and on different floors
« Reply #4 on: 23 Mar 2007, 03:52:31 »
Recommendation: Find a map called RED HOTEL or FORT ROOSTER and unpbo it. In both  missions, they have men in the hotel on various floors, looking out various windows and with various actions (guard, patrol, etc).

That will show you how to do it. No scripts involved.

Offline LeeHunt

  • Former Staff
  • ****
  • John 21:25
Re: Putting enemies inside buildings and on different floors
« Reply #5 on: 24 Mar 2007, 13:56:06 »
In the Init line of your unit put this: 

this setpos (nearestBuilding this buildingPos 1)

You can try buildingpos at higher numbers, i think one building even goes up to 22 positions....

Offline D_P_

  • Members
  • *
  • YAY! I'm a lama again! ...oh wait.
    • ArmaAddons
Re: Putting enemies inside buildings and on different floors
« Reply #6 on: 24 Mar 2007, 19:13:46 »
Quote
You can try buildingpos at higher numbers, i think one building even goes up to 22 positions....

The hotel I refered to above has over 180  :blink:
just setpos & forgetpos!