Doolittle 0 Posted January 24, 2008 Is it possible to assign a key to using a radio command.. like if radio option 1 was Call in Chopper and you hit X, that radio trigger would run? I know you can do this with actions. P.S. Is it possible to get a LOCATION back if you give a string name, like _location = getLocation "MyLocName" ?? Doolittle Share this post Link to post Share on other sites
loyalguard 15 Posted January 25, 2008 I think radio triggers can only be activated with the actual radio call (0-0-1 for Alpha and so on...). I tried to activate a radio trigger with a boolean as a condition (and then making that boolean true) with negative results. But, what you want can still be accomplished. Since all the radio call is going to do most likely is execute a script to summon the helo, we can use displaySetEventHandler to execute the script instead: init.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Delays creation of the event handler until everything else is initialized. sleep 1; // Creates the event handler that detects "Key Up" events and executes the script as appropriate. (findDisplay 46) displaySetEventHandler ["KeyUp", "_nil = _this execVM ""callHelo.sqf"""]; callHelo.sqf (Just a placeholder, instead of a hint it would actually contain code to summon helo) <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_key = _this select 1; // Gets key from event handler. _activationKey = 45; // 45 = "X" key. if (_key == _activationKey) then {hint "Helo en route"}; // Diplays hint if key pressed is "X". Share this post Link to post Share on other sites