OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: xCIA_BlackThorn on 20 May 2005, 21:28:03

Title: Forcing AI to walk in to buildings...?
Post by: xCIA_BlackThorn on 20 May 2005, 21:28:03
I have used the scripting (   Hint Format ["%1",getpos Player]   ) to get my Cords by radio, and then I went to the House I wanted my guy to walk in to and made a set of Cords in straight lines. Example:
Code: [Select]
_unit = _this select 0

#Walk
;1
_unit Move [9324.71,9407.17,-3.21482]
~5
;2
_unit Move [9328.82,9405.7,-2.98426]
~5
;3
_unit Move [9325.75,9398.99,-2.98003]
~5

etc...   But when I test it, the guy to be walking will not enter the structure, I know my Cords system works because if the house is not there he will move to the points no problem.  Maybe there is a way to make the AI 'ignor' the walls and walk the path I give him? The path is straight from the front door to the center of the next opening to walk straight to the next opening and so on.   Any Ideas?
Title: Re:Forcing AI to walk in to buildings...?
Post by: Planck on 20 May 2005, 21:33:32
Most, if not all, enterable building have 'positions'.

You can order units to the buildings 'positions'/

unitname move (buildingname buildingPos 1)

for example.


Planck
Title: Re:Forcing AI to walk in to buildings...?
Post by: sharkyjoe on 20 May 2005, 21:48:32
I'm also using the coord. point to point walking method. My civies walk around the buildings instead of going through openings. Then again, my Town is Lapany, that has a bunch of arched walk throughs. The best one is to use the building position. Look at my thread not to long ago http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=23225  and  then go to Bedges This thread. I used the marker method and my guy goes right to the spot on the third floor. Hope this helps