OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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?
-
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 ;)
-
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
-
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.
-
disableai "move" is a useful command to stop them playing around in there