DopeyBiach Posted December 29, 2011 Author Share Posted December 29, 2011 How would I go about making it so that when I hold down a specific key, it doesn't rapidly use it..Example:So that if you hold down CTRL you attack ONCE, rather than repeatedlyHowever I want it so it's not as irritating focusing on the chatbox using enter.PLEASE HELP MEH D: Link to comment Share on other sites More sharing options...
DopeyBiach Posted December 29, 2011 Author Share Posted December 29, 2011 Bump Link to comment Share on other sites More sharing options...
erkro1 Posted December 29, 2011 Share Posted December 29, 2011 You may only Bump when a topic is > 1 day old without answer. Link to comment Share on other sites More sharing options...
DopeyBiach Posted December 29, 2011 Author Share Posted December 29, 2011 Oops sorreh, :sad:Your apparently a phat coder.. You have any ideas D:? Link to comment Share on other sites More sharing options...
erkro1 Posted December 29, 2011 Share Posted December 29, 2011 I understand it :pLook at how its done with the hotbar. ;) Link to comment Share on other sites More sharing options...
DopeyBiach Posted December 29, 2011 Author Share Posted December 29, 2011 Willdo thankyou :DDD Link to comment Share on other sites More sharing options...
DopeyBiach Posted December 30, 2011 Author Share Posted December 30, 2011 Ugh still no luck, theres nothing in modinput to do with the F1-12 buttons :/ Any ideas?? PLEASE D: Link to comment Share on other sites More sharing options...
emblem Posted December 30, 2011 Share Posted December 30, 2011 Try looking for "HandleKeyPresses" .. Link to comment Share on other sites More sharing options...
DopeyBiach Posted December 30, 2011 Author Share Posted December 30, 2011 @Scootaloo:> Try looking for "HandleKeyPresses" ..@DopeyBiach:> Ugh still no luck, theres nothing in modinput to do with the F1-12 buttons :/ Any ideas?? PLEASE D: Link to comment Share on other sites More sharing options...
Scott Posted December 30, 2011 Share Posted December 30, 2011 Location (frmMain):```Private Sub Form_KeyUp```This handles Hotbar keys:``` ' hotbar For i = 1 To MAX_HOTBAR If KeyCode = 111 + i Then SendHotbarUse i End If Next``` Link to comment Share on other sites More sharing options...
Ruins of Hell Posted December 30, 2011 Share Posted December 30, 2011 @Scott:> Location (frmMain):> ```> Private Sub Form_KeyUp> ```> > This handles Hotbar keys:> ```> ' hotbar> For i = 1 To MAX_HOTBAR> If KeyCode = 111 + i Then> SendHotbarUse i> End If> Next> > ```To clarify, 111 is vbKeyF1 - 1, so to use numbers instead, you code do vbKey1 - 1\. Link to comment Share on other sites More sharing options...
Joyce Posted January 6, 2012 Share Posted January 6, 2012 You could set say, a flag for the button you want pressed, and set it to 1 when pressed.. e.g. the following pseudo code:``` If ButtonDown = True and Flag = 0 then Flag = 1 Do Stuff hereElseIf ButtonDown = False Then Flag = 0EndIf```Basically, what that does is limit the use to ONE time per press, as the value only resets once you would release the button in question. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now