Smurf 12 Posted September 25, 2010 Hi, theres is any way to check how many positions a building has? For the command: _a = round(random 13); downpilot setpos (getMarkerPos "kidnap"); Downpilot setPos ((nearestBuilding downpilot) buildingPos _a); Right now the marker "kidnap" is static and I know how many positions that given building have. But if I didn´t know, there is a way to check to use in the "random" line? AND There is a way to check if a unit have a flat tire? Or even better, there is a way to force an AI to stay inside a vehicle thats very damaged or with a flat tire? Tried disableAI "Move" but didnt worked =\ Thanks. Share this post Link to post Share on other sites
twirly 11 Posted September 26, 2010 (edited) This may help you with the building positions man....adapt it to your needs. //*** finds number of positions in nearst house _house = position leader esqd1 nearestObject "Building"; _posarray = []; _rndpos = []; _pos = []; _cnt = 0; while {format ["%1", _house buildingPos _cnt] != "[0,0,0]" } do { _pos = _house buildingPos _cnt; _posarray = _posarray + [[_pos]]; _cnt = _cnt + 1; sleep 0.02; }; Then "_posarray" will contain all the positions in "_house". Edited September 26, 2010 by twirly Share this post Link to post Share on other sites
Smurf 12 Posted September 27, 2010 Thank you, will have a look at that today. Share this post Link to post Share on other sites