Bot Commander Script

3 Juny 2011
769
0
16
31
Ciutat de Mallorca
#1
Estructura

init.sqf
mission.sqm
world_scan.sqf

functions
new_static_marker.sqf




init.sqf
Codi:
[]execVM "world_scan.sqf";
world_scan.sqf
Codi:
//WORLD_SCAN


private ["_i","_select","_urban_locations_count"];


//PROPIETATS
URBAN_LOCATIONS = nearestLocations [getPos LOGIC, ["NameCity"], 100000];
MARINE_LOCATIONS = nearestLocations [getPos LOGIC, ["NameMarine"], 100000];
LOCAL_LOCATIONS = nearestLocations [getPos LOGIC, ["NameLocal"], 100000];


//COS
_urban_locations_count = count URBAN_LOCATIONS;
hint format["%1",__urban_locations_count];


systemChat "START URBAN SCAN...";
Sleep 2;
_i = 0;
while {_i != _urban_locations_count} do
{
	systemChat format["%1/%2",_i,_urban_locations_count];
	_select = URBAN_LOCATIONS select _i;
	
	//!!!!!PROVISIONAL!!!!!
	[format["%1%2",name _select,_i], locationPosition _select, "ColorBlue", "mil_dot"] execVM "functions\new_static_marker.sqf";
	_i = _i + 1;
};
//{[name _x, locationPosition _x, "ColorBlue", "mil_dot"] execVM "functions\new_static_marker.sqf"} forEach _nearbyLocations;[code]//new_static_marker

private ["_name","_pos","_mark","_color","_type"];

//PROPIETATS
_name = _this select 0;
_pos = _this select 1;
_color = _this select 2;
_type = _this select 3;

//COS
_mark = createMarker [_name, _pos];
_mark setMarkerColor _color;
_mark setMarkerType _type;