Softegg 0 Posted July 17, 2003 is there a way to detect all mines on the whole island? i placed a mine somewhere, named it: mine1 typeof mine1 returns: "" so, how to search mines with nearestobject[player,"object"]? my idea is: finding a mine with: nearestobject[_posi,"MineMine"] setting a marker at this point setting _posi at mine-posi removing mine searching next mine Share this post Link to post Share on other sites
toadeater 0 Posted July 18, 2003 is there a way to detect all mines on the whole island?i placed a mine somewhere, named it: mine1 typeof mine1 returns: "" so, how to search mines with nearestobject[player,"object"]? my idea is: finding a mine with: nearestobject[_posi,"MineMine"] setting a marker at this point setting _posi at mine-posi removing mine searching next mine This should work, if you use the standard OFP antitank mine object: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #checkmine _death= nearestobject [player, "MINE"] ? player distance _death < 1.5 : goto "explode" ~.5 goto "checkmine" #explode Boom="Heat105" CamCreate (getpos player) player setdammage 99999999 exit Share this post Link to post Share on other sites
Softegg 0 Posted July 21, 2003 k, nearestobject[_posi,"Mine"] works. but i need to scan the hole island in steps of 64m, cause nearestobject seems to find things at about 50-75m maximum distance. Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted July 21, 2003 Hi, I noticed on some MP, Battlefield 1985 maps. A marker is displayed on the map when a player plants a mine. You could DePbo to find out how, as I dont know how to detect when a mine is layed? So if you maintained an array of all the the mines planted, you could use the "obj1 distance obj2" command? Or you could hold an array of all the [X,Y] positions and use: _Distance=Sqrt(((_MineXPos-_PlayerXPos)^2)+((_MineYPos-_PlayerYPos)^2)) Although I'm not sure how quick this would be compared to nearest object, if you had lots of mines and scanned ever 0.5 seconds. Share this post Link to post Share on other sites
MASTAKILLA 0 Posted July 31, 2003 is there a mine detecting addon in progress or does such thing already exist in ofp? would be usefull for the coc mines Share this post Link to post Share on other sites