Posted December 18, 20159 yr I'm using Robot rn to stimulate keyboard input, whenever i'm using robot.delay(ms) it makes my game freeze the amount of "ms" passed in that method, need help!
December 18, 20159 yr Author That's what I want lol, 50 ms is great. Could you pass me a base code for that if so? here's an example try { robot = new Robot(); robot.keyPress(KeyEvent.Vk_W); //Need a 50ms delay here robot.keyRelease(KeyEvent.Vk_W); } } catch (AWTException e) { e.printStackTrace(); }
December 19, 20159 yr Author here's what I got but this whole thing MUST be in onUpdate() the problem is I want it so everytime I hit someone it starts this tick private int ticks = 0; if(ticks % 6 == 0) { System.out.println("blah"); } ticks ++;
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.