wass24 0 Posted February 14, 2006 Is it possible to reassign a key on the keyboard to execute a script? I want to be able to use a gasmask just like Binos or night vision. Share this post Link to post Share on other sites
nominesine 0 Posted February 14, 2006 Not really, but there's a program called F-watch that might provide a workaround. Search for it in these forums and you'll find it. Share this post Link to post Share on other sites
[aps]gnat 28 Posted February 14, 2006 There was also a thing called "Phobos" or something like that that allowed something similar. I found the thread from 2002 last night, but can't find it again .... Share this post Link to post Share on other sites
General Barron 0 Posted February 15, 2006 Fwatch is the way to go. Read the documentation and it is easy to use. Check it out here: http://ofp.gamepark.cz/index.php?showthis=8361 Here is a quick example of how to script what you want: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#top @(call loadfile ":input getkey x") == 1 ;do something ~0.5 goto "top" The above script waits until the user has pressed the "x" key (change to whichever key you need), then it takes some action, and goes back to waiting again (the delay is to give time for the user to release the key). If you want to assign commands to more than one key, try this slightly more complicated script (adapted from my HS command system): <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_k = [] #Top @call {_k = call loadfile ":input getkeys"; ({_x in _k} count ["1","2","3"]) != 0} ;check which number key was pressed ? "1" in _k : (do something); goto "Wait" ? "2" in _k : (do something else); goto "Wait" ? "3" in _k : (do something else); goto "Wait" #Wait ~0.5 goto "Top" This script waits for the player to press one of the keys we are watching for, then it takes action based on which key was pressed. This should be lower-impact on the CPU than running 3 copies of the first script, each with different keys. It should be fairly obvious how to add more keys to the above template. I should point out that, unfortunately, Fwatch can't detect all the keys on the keyboard (characters like ~, -, +, [, and ] for example). Also, one of the many cool features of Fwatch is that you can make it completely optional for your mission. So you could run the above script only if the player actually has fwatch running. If he didn't, the script simply wouldn't run, and there would be no other errors. Again, check the documentation for more info. I hope this helps. If you have any Qs on how to script with Fwatch, ask and I'll be glad to help out. I'd love to see this AWESOME program get used more by editors. Share this post Link to post Share on other sites
Matthijs 40 Posted February 15, 2006 Or get VBS1. I suspect ArmA will also support this. Share this post Link to post Share on other sites
Migebuff 0 Posted February 18, 2006 Prosphere Lite lets you assign keys to scripts. Share this post Link to post Share on other sites
baddo 0 Posted February 19, 2006 I also encourage you to try fwatch, it is a great program and relatively easy to start tinkering with. Only problem with it is the fact that it works only on Windows operating systems and that practically means all the Linux dedicated servers have to live without it Share this post Link to post Share on other sites
General Barron 0 Posted February 19, 2006 Prosphere Lite lets you assign keys to scripts. I've never heard of "Prosphere Lite". Could you provide a link please? Share this post Link to post Share on other sites
UNN 0 Posted February 19, 2006 It uses the same idea as Vektorbosons afterburner script. Creating a Camera object and reading the change in it's velocity. There was a tutorial covering the principle at OFPEC, you may have seen it? Chops used it recently with his bomb cam script. Not sure how ProShpere fits in chronologically speaking, with Vektorbosons scripts? But essentially it's the same idea. Share this post Link to post Share on other sites
Sniperwolf572 758 Posted February 19, 2006 You can get ProSphere Lite here. Share this post Link to post Share on other sites
General Barron 0 Posted February 19, 2006 Interesting set of scripts. I'll have to look into them in depth. Share this post Link to post Share on other sites