Tova 130 Posted August 23, 2018 To sum it up, I am trying to get an AI unit inside a 3 floor building, to do so I am using unit1 doMove (hotel buildingPos 153); as a sidenote, hotel buildingPos 153; returns the coordinates : [7063.92,2619.78,7.28142] Now the issue is that unit1 doesn't go to the 3rd floor, where buildingPos 153 is located, but goes "under" the designated location while staying on the ground floor (coordinates [7063.92,2619.78, 0.00143909]). The most surprising, is that if I issue the command to unit1 through the in-game command menu, it gets to the right position (that is on the 3rd floor) ! So gentlemen, any guesses for a way to get unit1 where I want ? (No, setPos is not a viable option :p) Share this post Link to post Share on other sites
gc8 977 Posted August 23, 2018 Have you tried https://community.bistudio.com/wiki/moveTo? I'm just guessing :) Share this post Link to post Share on other sites
Tova 130 Posted August 23, 2018 I just gave it a try, but no luck unfortunately... Actually it's even worse : they do not move at all with moveTo... Share this post Link to post Share on other sites
gc8 977 Posted August 23, 2018 Ok this is just an idea but maybe setting the z value little higher helps? Share this post Link to post Share on other sites
pierremgi 4889 Posted August 23, 2018 The problem is that if the hotel hasn't path, any AI unit will be able to reach this position. Building position doesn't always mean path to them, unfortunately. 1 Share this post Link to post Share on other sites
Tova 130 Posted August 23, 2018 @pierremgi I don't understand very well what you do mean, but I believe that the hotel has a Path defined since if I order the unit to move there in game, using the ~ menu and move there, it reaches that spot with no issues. Share this post Link to post Share on other sites
pierremgi 4889 Posted August 23, 2018 1 minute ago, Tova said: @pierremgi I don't understand very well what you do mean, but I believe that the hotel has a Path defined since if I order the unit to move there in game, using the ~ menu and move there, it reaches that spot with no issues. Ai can reach the hotel, even close to the final position but it can't reach a position at 3rd floor because there is no path from the hotel position (where Ai stops) and this elevated position. Many of houses in Tanoa are made like this. Of course players cans do what they want, but Ais can't. You can find several topics about this problem. 1 Share this post Link to post Share on other sites
Tova 130 Posted August 23, 2018 10 minutes ago, pierremgi said: Ai can reach the hotel, even close to the final position but it can't reach a position at 3rd floor because there is no path from the hotel position (where Ai stops) and this elevated position. Many of houses in Tanoa are made like this. Of course players cans do what they want, but Ais can't. You can find several topics about this problem. Oookay, I get your point... So basically nothing to do about it... Share this post Link to post Share on other sites
Tova 130 Posted September 29, 2018 Also for future reference, a workaround to get the AI units to the requested position is to ask them to follow a "position path". The idea being that if there's no path defined for the AI to go from outside the building to the requested position, it is possible that such a path is defined from another position in the building. (Path from outside-->position 37 not defined, but path from position 12-->position 37 is defined). I managed to solve my issue by giving the AI "intermediate positions" in each floor : {unit1 doMove (hotel buildingPos _x); sleep 1; waitUntil {unitready unit1 }; } forEach [0,12,52,101,153]; //0 being a position just after the entrance //12 position near the stairs //52 position after the stairs in floor 1 //101 position after the stairs floor 2 //153 final position on the 3rd floor 1 Share this post Link to post Share on other sites