Fortnite keyboard trainer
One of the big challenges in getting good at Fortnite is getting good at building. While many hours of playing Wolf3D, DOOM, Descent etc have drilled the standard WASD key mapping into instinct, but I find I'm fumbling when I want to build. I realized I needed something akin to typing drills, so I coded something up in Javascript:
<html><head> <title>Fortnite keyboard trainer</title> <script language="Javascript"> var h1txt = ""; var h2txt = ""; var idx = -1; var kcc = 0; var ecc = 0; var streak = 0; var action = ["WALL", "FLOOR", "RAMP", "ROOF", "TRAP"]; var key = ["q", "w", "r", "t", "y"]; function keypress1(evt, t) { if (idx < 0) { idx = Math.floor(Math.random() * action.length); h1txt = action[idx]; kcc = key[idx].charCodeAt(0); } else { if (window.event) ecc = evt.keyCode; else ecc = evt.charCode; if ( ecc == kcc ) { streak += 1; ecc = idx; do { idx = Math.floor(Math.random() * action.length); } while ( idx == ecc ); h1txt = action[idx]; kcc = key[idx].charCodeAt(0); } else { streak = 0;// res = "kcc=" + kcc + " " + key[idx] + " " + action[idx] + " ecc=" + ecc; } } document.getElementById("h1text").innerHTML = h1txt; h2txt = "Streak: " + streak; document.getElementById("h2text").innerHTML = h2txt; } </script></head><body onkeypress="keypress1(event,this)" id="bodyid"> <h1 align=center id="h1text"> Press any key when ready </h1> <h2 align=center id="h2text"> </h2></body></html>
Note: this is using a custom layout which is based around using ESDF for movement and making the keys needed for battle (e.g. building) closest to those.
0 Comments
Recommended Comments
There are no comments to display.