Taurus 20 Posted July 20, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_moron = _this select 0; _group = group _moron; _building = (getPos _moron) nearestObject 135099; _wp = _group addWaypoint [getPos _building,0]; _wp waypointAttachObject 135099; _wp setWaypointHousePosition 14; //Upper floor _wp setWaypointType "MOVE"; He'll move to the house, but not up a floor... I've checked the position when commanding one of my GI's "2: Goto house blabla" In game order view I see "house position #14" And my guy will move there. But it doesn't work when scripting an AI. So, what am I doing wrong? Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 20, 2007 The number you see when you order him ingame is one more than the actual building pos index (since that starts at 0, where ingame they appear to start at 1). So it should be _wp setWaypointHousePosition 13. Share this post Link to post Share on other sites
Taurus 20 Posted July 20, 2007 Thanks Kyle! However setting 13 didn't do the trick either, provided that my approach on that code up there is correct. Oh and btw "He'll move to the house" Means he runs through the house to the opposite side. Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 20, 2007 Well, I just realized that there's absolutely no need to attach the waypoint to the house, all you have to do is make the waypoint position the building pos position: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _moron = _this select 0; _group = group _moron; _building = (getPos _moron) nearestObject 135099; _wp = _group addWaypoint [(_building buildingPos 13),0]; _wp setWaypointType "MOVE"; Btw, maybe if you didn't call him a moron the AI would cooperate better with you. Share this post Link to post Share on other sites
Taurus 20 Posted July 21, 2007 That worked perfectly !! Btw, maybe if you didn't call him a moron the AI would cooperate better with you. They "might" but I doubt it. made a "board house" script now xD Share this post Link to post Share on other sites