lucilk 10 Posted January 19, 2010 is there any script that checks if the ground of a location or marker is flat and there is no objects, i need this for a script where i have to make a helicopter force land but i need to postion him on a flat ground, but i dont know how to make the script look for a flat and clear area Share this post Link to post Share on other sites
loshon 10 Posted January 19, 2010 (edited) You could just have a large amount of markers set up on places you know are flat ground all over the map, and have it select the one closest. You'd have to ask someone else how to do that, though. Edited January 19, 2010 by loshon Share this post Link to post Share on other sites
lucilk 10 Posted January 19, 2010 not a good ideea, as it will be used in calling some chopers for support and they need to land, i am sure there is a way just dont know what it is Share this post Link to post Share on other sites
CarlGustaffa 4 Posted January 19, 2010 Place functions module on map. Place a trigger on the map that opens up the help. http://community.bistudio.com/wiki/BIS_fnc_help Have a look in the misc folder, I'm sure you can find something to use :) Something "safe" :p Share this post Link to post Share on other sites
Egosa-U 10 Posted January 19, 2010 How do you open up that help?? Share this post Link to post Share on other sites
HateDread 13 Posted January 19, 2010 Make a trigger; Cond: !isnil "bis_fnc_init" On Act: [] call BIS_fnc_help; From http://community.bistudio.com/wiki/BIS_fnc_help; Regards. Share this post Link to post Share on other sites
Andy455 11 Posted January 19, 2010 Maybe you could use the command: isFlatEmpty? It seems to do what you want it to, although I'm not sure if it checks for objects (not in a position to test right now). Share this post Link to post Share on other sites
HateDread 13 Posted January 19, 2010 You could combine 'isFlatEmpty' with an AND, and 'nearestobject' style command, with the distance command, where you check 'isflatempty' and whether the nearest object is above a certain distance. Share this post Link to post Share on other sites
blakeace 11 Posted January 20, 2010 You could combine 'isFlatEmpty' with an AND, and 'nearestobject' style command, with the distance command, where you check 'isflatempty' and whether the nearest object is above a certain distance. This will actually do both, you specify the maximum angle with the value in front of the Max Gradient comment currently set at 0.3 below, the higher the value the greater the slope is allowed to be. Set the local variable _preview to equal the object you want to move, and it checks to see if there is room to place it. To see how it works, place in a loop that uses a hint to show the returned value in _isFlat, and set the position on yourself. Make _preview something bigger like a warfare building and run around. It will save the position values [x,y,z] in _isFlat only if the criterea is met. So I check the count _isFlat > 0 to tell me if it is returning a valid position. _isFlat = (_start) isflatempty [ (sizeof typeof _preview) / 2, //--- Minimal distance from another object 0, //--- If 0, just check position. If >0, select new one 0.3, //--- Max gradient (sizeof typeof _preview), //--- Gradient area 0, //--- 0 for restricted water, 2 for required water, false, //--- True if some water can be in 25m radius _preview //--- Ignored object ]; Share this post Link to post Share on other sites