speeder 0 Posted September 13, 2011 Hi people. In the effort to test my clan mates abilities to read a map I wanted to make a small test-mission. I would like to have 1 instructor and 8 students. If I click Radio Alpha and then click on map, I would like student1 to be moved to that location. Radio Bravo moves student2 etc. and instructor as number 9. Second this is to create a marker which only the instructor can see at each of the students locations, which will follow them every 5 seconds. If anybody up for making me an example-mission? Share this post Link to post Share on other sites
demonized 20 Posted September 13, 2011 maximum 10 trainees + 1 Instructor. place this in init of Instructor unit: _null = this execVM "mapRead.sqf"; save this as mapRead.sqf and place in your mission folder. if (_this != player) exitWith {}; // create a marker for Instructor to see where he want to teleport trainee to. _marker = createMarkerLocal["Destination",[0,0,0]]; _marker setMarkerShapeLocal "ICON"; _marker setMarkerTypeLocal "Flag"; _marker setMarkerColorLocal "ColorBlack"; _marker setMarkerTextLocal "Teleport here"; // give Instructor on map click ability. onMapSingleClick """Destination"" setMarkerPosLocal _pos; true;" // create markers and track all players for Instructor to see only, should be JIP compatible: // also creates radio triggers for Instructor only. _pList = []; _cnt = -1; _radio = ["ALPHA", "BRAVO", "CHARLIE", "DELTA", "ECHO", "FOXTROT", "GOLF", "HOTEL", "INDIA", "JULIET"]; while {true} do { { if (!(_x in _pList)) then { _cnt = _cnt + 1; // marker. _mName = format["marker_%1",_cnt]; _marker = createMarkerLocal[_mName,(getPos _x)]; _marker setMarkerShapeLocal "ICON"; _marker setMarkerTypeLocal "DOT"; _marker setMarkerColorLocal "ColorBlue"; _pName = format["%1",(name _x)]; _marker setMarkerTextLocal _pName; _pList = _pList + [_x,_marker]; // radio trigger. _trg = createTrigger["EmptyDetector",getPos player]; _trg setTriggerArea[5,5,0,false]; _trg setTriggerActivation[(_radio select _cnt),"PRESENT",true]; _state = format["%1 setPos (getMarkerPos ""Destination"")",_x]; _trg setTriggerStatements["this", _state, ""]; _tName = format["%1",(name _x)]; _trg setTriggerText _tName; } else { _sel = _pList find _x; _mark = _pList select (_sel + 1); _mark setMarkerPosLocal (getPos _x); }; } foreach playableUnits; sleep 1; }; the script will create tracking markes and trigger for all units dynamically even for JIP. Instructor click on map to place his locally seen marker, then selects a radio trigger to teleport that person to the marker. it should all be dynamically good, JIP, various amounts of trainees, disconnects etc UNTESTED btw X) Share this post Link to post Share on other sites
speeder 0 Posted September 13, 2011 Brillant - Will look forward to testing it. Share this post Link to post Share on other sites