_SCAR 139 Posted April 24, 2017 Hello, I'd like to display additional information when the watch is opened. Is there any way to capture the event that a user has opened their watch from a script? Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted April 24, 2017 Here you go. Cheers Share this post Link to post Share on other sites
_SCAR 139 Posted April 24, 2017 Thank you but this isn't an event, are you suggesting that I spawn a process that checks for this every 0.02 seconds or so? Share this post Link to post Share on other sites
_SCAR 139 Posted April 24, 2017 Found it. For anyone else wondering: https://community.bistudio.com/wiki/inputAction Share this post Link to post Share on other sites
Midnighters 152 Posted April 25, 2017 On 4/24/2017 at 3:34 AM, _SCAR said: Found it. For anyone else wondering: https://community.bistudio.com/wiki/inputAction You'd still need to check every so often with inputAction like a waitUntil statement. So I see no need for inputAction and I recommend GOM's post, since the keys alone don't always work specifically for their function at all times. Share this post Link to post Share on other sites
killzone_kid 1330 Posted April 25, 2017 2 hours ago, Midnighters said: So I see no need for inputAction Maybe he wants to use it inside UI Event Handler? Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 6 hours ago, killzone_kid said: Maybe he wants to use it inside UI Event Handler? I dunno, never mentioned such so I'm just going with whatever. input action method is probably the worst way to go in this case though, that is for sure. Share this post Link to post Share on other sites
pierremgi 4871 Posted April 26, 2017 11 hours ago, killzone_kid said: Maybe he wants to use it inside UI Event Handler? Which one? It's not an action "in menu" like "disassemble". "Watch" or "WatchToggle" aren't detected by the ingameUISetEH "action", if I'm right. Neither "rearm"... I don't know how to say that in English but input actions (UI EH "action" doesn't fire) seem to me different from Arma 3 actions (UI EH "action" fires). Share this post Link to post Share on other sites
killzone_kid 1330 Posted April 26, 2017 (edited) 1 hour ago, pierremgi said: Which one? It's not an action "in menu" like "disassemble". "Watch" or "WatchToggle" aren't detected by the ingameUISetEH "action", if I'm right. Neither "rearm"... I don't know how to say that in English but input actions (UI EH "action" doesn't fire) seem to me different from Arma 3 actions (UI EH "action" fires). https://community.bistudio.com/wiki/User_Interface_Event_Handlers - UI Event Handlers Edited April 26, 2017 by killzone_kid Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted April 26, 2017 Aaaand to complete the circle: _id = (findDisplay 46) displayAddEventHandler ["KeyDown", { params ["_display","_key"]; if (_key isEqualTo 24) then {systemchat format ["Watch opened, it is %1.",[daytime,"HH:MM:SS"] call BIS_fnc_timeToString] } else {systemchat "This is not your watch."}; }]; Cheers Share this post Link to post Share on other sites
pierremgi 4871 Posted April 26, 2017 Thanks Grumpy. I just forgot displayAddEventHandler was an UI EH. I focused on UI in IngameSetUIEH... I lost my Latin in all these action/inputaction, UI EH, display's and so on. Even if I already scripted some lines with that ! Share this post Link to post Share on other sites
Midnighters 152 Posted April 26, 2017 Welp. Solution found then. Share this post Link to post Share on other sites
_SCAR 139 Posted April 27, 2017 I am using the example on the page I've posted and it works beautifully. Of course I'm running it inside a spawn. Share this post Link to post Share on other sites