scars09 9 Posted October 31, 2007 1. on custom maps, name setpos (nearestbuilding this buildingpos 0) doesnt work. strange is that name setpos (nearestobject this buildingpos 0) does work, the unit is at the buildingpos, but arma gives an errormessage that nearestbuilding is needed? working function with an errormessage? 2. If ai group is in a bmp, leader is no crewmember, and ammo low, the crew will get out and in the bmp endlessly. as soon they get in they say ammo low, ai leader send them to disembark and rearm at the own bmp, they do, get in again and say, ammo low and leader send them out again to rearm at the bmp, and again and again and again. maybe someone can use the info, or had a problem wich was somehow related to this. Share this post Link to post Share on other sites
fasad 1 Posted October 31, 2007 1: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player setPos ((nearestBuilding player) buildingPos 0) works as expected for me. 2: I have reported this bug on the BTS. It's caused by AI in a vehicle with low ammo trying to rearm their personal ammo with the magazine cargo carried by the same vehicle. A workaround is to remove all magazine cargo (clearMagazineCargo) from the vehicle, or ensure the AI units have a completely full load of personal ammo. Share this post Link to post Share on other sites
scars09 9 Posted November 1, 2007 thx for the reply fasad. clearing the magazine cargo was the workaround i used. but it isnt a good choice in all occasions. good to hear its allready mentioned in the bugtracker. the buildingpos issue happens only on custom islands, not the original BIS islands. the really strange thing in my opinion is that the nearestobject setpos works technically, but brings up (an expected) error message. i had this issues on every custom map i tested it on. sakakah, manual island by alex sworn, mapfact dry sahrani and so on. most of the islands were allready made before the island tools were released, maybe the problem is gone as soon the islands get updated. thx again for the reply Share this post Link to post Share on other sites
fasad 1 Posted November 1, 2007 Oh, sorry I missed that it was on custom islands.. I suspect it might be something to do with binarizing, or maybe it's a missing function of custom made islands/terrain. You may want to raise the question in the Visitor forum (Edge, who I presume is a BI staff member, lives in there and has been very helpful with any issues with the tool). ArmA still sees the object's class as "house", but not as a building... odd. This works, although it may not include all buildings with positions, and house class buildings with no positions. You may want to add a check to make sure the returned position is not [0,0,0]: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player setpos ((getpos player nearestobject "house") buildingpos 0) Share this post Link to post Share on other sites
scars09 9 Posted November 2, 2007 Quote[/b] ]player setpos ((getpos player nearestobject "house") buildingpos 0) very nice fasad i would never came up with the idea to try it this way that allready help me alot. the only thing that enoyed me was the error message, wich is gone now. thx alot!! Share this post Link to post Share on other sites