OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rysumm on 11 Jun 2004, 04:18:55

Title: placing ai houses?
Post by: Rysumm on 11 Jun 2004, 04:18:55
Alright, I can't get Ai to be placed in houses. I am using the waypoints and placing them in different positions but they keep ending up on the roof tops.

My 2nd question is about group controled units. How do you get your group ai to follow you into houses?
Title: Re:placing ai houses?
Post by: TH on 11 Jun 2004, 05:09:17
try putting this in the units init line
this setpos [(getpos this select 0), (getpos this select 1), 1]
where the 1 is will be the height he is at, so he wont be on the roof top. try some different numbers in there and see how they work ;D
Title: Re:placing ai houses?
Post by: nEO iNC on 11 Jun 2004, 10:28:18
Hey all,

you could do the following;

solpos = (object 'building id') buildingpos 'position'

then

soldiername setpos solpos

where;
'building id' = editor id for the building eg. 12345 (no qoutes)
'position' = position number (no qoutes). Each building you can walk into has various positions 1, 2, 3, 4, 5... etc. The number of positions depends on the building size. Just put an number here and see where he goes...
soldiername = name of the unit to move.

Getting AI units to follow you into a building can be tricky... The best way is to make sure they are in SAFE mode, or they just tend to run around like head-less chickens. It can also depend on the formation you use for the group you are controlling. No hard and fast rules I'm affraid...  :(
Title: Re:placing ai houses?
Post by: macguba on 11 Jun 2004, 11:59:39
If you want one of your squad to go into a house the best thing to do is to order the loon into one of the positions in the house.     They will follow you sometimes, but generally they just mill around and get in the way.   OFP is not an urban combat game where you can clear rooms by teams and so on.
Title: Re:placing ai houses?
Post by: MuSe on 11 Jun 2004, 13:34:49
you can also use waypoints to make units walk inside houses. Select waypoints and double-click on a building that can be entered, you will notice that you can choose a position to place the unit in the building.
Title: Re:placing ai houses?
Post by: Rysumm on 12 Jun 2004, 05:04:50
Ok,  I got it figured out. Thanks all.