Ruskiesrule 0 Posted March 14, 2003 I'm making one of those hunted missions for multi player, and i need to have a radio command that a player can send that quickly shows up a message saying "I've spotted him, hes at" and then i need a script to give that players posistion. I'm making two, one which involves American soldiers who get to use jeeps with mg, and search choppers. And a resistance hunter/sniper one when its just some guys with jeeps/uazs to get around the area. Share this post Link to post Share on other sites
RED 0 Posted March 14, 2003 Set up a trigger which will detect if the unit has been spotted, in the onactivation field of that trigger put: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[unitsname] exec "spotted.sqs"<span id='postcolor'> Spotted.sqs: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = getpos _this select 0 _gridpos = (_unit) call preprocessFile "pos2grid.sqf" unitname sidechat format ["I've spotted him, hes at %1", _pos] <span id='postcolor'> Pos2grid.sqf by Vektorboson </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define DIV(_X, _Y) ((_X / _Y) - (_X / _Y) % 1) #define MOD(_X, _Y) ((_X % _Y) - (_X % _Y) % 1) private ["_a", "_b", "_result", "_big", "_small", "_num", "_g1", "_g2", "_g3", "_g4"]; _a = _this select 0; _b = _this select 1; _big = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]; _small = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]; _num = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]; _g1 = DIV(_a, 1280); _g2 = DIV( MOD(_a, 1280), 128); _g3 = DIV(_b, 1280); _g4 = DIV( MOD(_b, 1280), 128); _result = format ["%1%2%3%4", _big select _g1, _small select _g2, _num select _g3, _num select _g4]; _result <span id='postcolor'> Thanks to Vektorboson for the pos2grid script. RED Share this post Link to post Share on other sites