zonekiller 175 Posted April 29, 2008 i would like to run a script by pressing the home key on the keyboard can this be done ? i can not find anything in the wiki. thanks in advance Michael Share this post Link to post Share on other sites
Guest Posted April 29, 2008 The SU34 Effects script used a keypress to activate the afterburner if I remember correctly. So, maybe by having a look at it you can figure out how to use a certain key for your script. PS: That is not the latest version of that script but I wasn't able to find that anywhere and it seems the creator left the community. Share this post Link to post Share on other sites
loyalguard 15 Posted April 29, 2008 Look at the example for displaySetEventHandler. Share this post Link to post Share on other sites
Hondo 0 Posted April 30, 2008 The display event handler is probably the thing you want, but just for the sake of completeness... You can also do it with an action if you want to tie it to a control function rather than a specific key (like "moveForward" as opposed to "w"). addAction ("Alternative Syntax") key mapping For example, you might make an afterburner that uses vehicle turbo to activate: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _thrust = 50; // gets passed to afterburner.sqf as _this select 3 _plane addaction ["Afterburner", "afterburner.sqf", _thrust, 0, false, false, "heliFastForward"]; However, it clutters up the action menu and anyone can see/activate it if they're in range, so it's not appropriate for everything. Share this post Link to post Share on other sites
zonekiller 175 Posted May 5, 2008 Thanks guys The missions is complete now and everything working the way i want Share this post Link to post Share on other sites