OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pexmo on 13 Dec 2004, 08:32:20

Title: Placing units in buildings?
Post by: pexmo on 13 Dec 2004, 08:32:20
I want to put a enemy soldier in a window to snipe at the players. i have only got this working if the house has a hole in the roof just above the spot i want the sniper to be at. Can i get a unit to spawn inside a regular house?
Title: Re:Placing units in buildings?
Post by: greg147 on 13 Dec 2004, 08:34:51
You can place the sniper on the grey square of the building, and put

this setpos [(GetPos this select 0), (GetPos this select 1), 13]

and change the 13 higher or lower until the player is at the right height to be looking out of the window  ;)
Title: Re:Placing units in buildings?
Post by: Blip on 13 Dec 2004, 09:09:04
this setpos ((object XXXXX) buildingPos 1)

xxxxx is where you put the id #

buildingPos # : There are usually multiple places a unit can be placed in the building so try changing the number.

Later,

Blip
Title: Re:Placing units in buildings?
Post by: The-Architect on 13 Dec 2004, 11:05:01
Placing units in buildings can be very annoying.

AI can move through walls so be very careful where you place them.
The last thing a playerwants to see is an AK pointing at them through a wall. The AI can shoot you but you can't shoot the AI. Very annoying.
Title: Re:Placing units in buildings?
Post by: bored_onion on 13 Dec 2004, 17:53:23
disableai "move" is a useful command to stop them playing around in there