Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Autofire


  • Please log in to reply
8 replies to this topic
Hori
  • Members
  • 11 posts
  • Last active: Jun 26 2006 04:01 AM
  • Joined: 26 Apr 2006
[color=red]~RButton[/color]:: 
Loop 
{ 
    Sleep 0.0001  ; This is the delay between clicks, in milliseconds. 
    GetKeyState, RButtonState, RButton, P 
    if RButtonState = U  ; User has physically released the button, so end the loop. 
        break  
    [color=red]MouseClick, Right [/color]
} 
return

The above-script is the "Autofire" mapping previously suggested by Chris in whcih I believe it works. (being initially tested)
It shows how to set the "Autofire" for Right_MouseClick by using "Loop."

The Autofire script can be useful for playing PC games such as Shooter or Fighter.

From the above-example, how do you modify it to letter [A ~ Z] & [NumPad0 ~NumPad9]?

Would you show me an example for setting "a" & NumPad8 for the Autofire instead of Right_MouseClick?

foom
  • Members
  • 386 posts
  • Last active: Jul 04 2007 04:53 PM
  • Joined: 19 Apr 2006
numpad5 & numpad8::
Loop
{ 
    Sleep 10  ; Minimum sleeptime is 10 ms 0.0001 would be treated as 10
    if ( !GetKeyState("numpad5", "P") or !GetKeyState("numpad8", "P") )  ; User has physically released the buttons, so end the loop.
        break  
    tooltip, Fire...!!!
}
tooltip,
return
Edit: Btw using the search and specifying autofire as searchterm pops up numerous results.

Hori
  • Members
  • 11 posts
  • Last active: Jun 26 2006 04:01 AM
  • Joined: 26 Apr 2006
~*$a:: 
face=o_O 
loop 
{ 
    GetKeyState, key_state, a, P 
    if key_state = U 
    { 
    tooltip, 
    break 
    } 
if (face == "o_O") 
    face = O_o 
else 
    face = o_O 


tooltip, % face 
send, {a} 
sleep, 1 
} 
return

There was another script that works but it is not as accurate as what Chris has made, and the result was obvious from testing the both.

Looks like you took that idea and sort of made it up, but it seems like it has never been tested. So, I of course, have tested your script and first of all, it is obviously missing something there, therefore, your script won't even respond at all.

* Most game uses 60 fps, in other words, there are 60 frames displaying within a second. So, 1/60fps(0.0166 Sec) is approximately equal to the delay time of 1 (Frame).

* The delay of 4 or above (0.064=4/60fps or above for the quickness of repeated rate between the keystrokes that goes on and off within a second) often results in a delayed response while attepting to make a move. For playing a fighting game, it is a good example that often applies the result to that matter.

* Because although it is not easy to repeat a single keystroke for a multi-reponse within 60fps, it is also possible to input a single keystroke within the delay of 3 or less by a common keyboard or joystick; therefore, having a multi-response within a second is only a matter of practice by repeating a single keystroke as quickly as possible in a accurate manner in which speaking of the Autofire, we can still do it without it which makes it useless to benefit neither the quickness nor the accuracy in this case.

- For an example, most happ buttons (that uses in the Arcade Joysticks) are designed to respond as quickly as 1/60fps except it is not automated (autofire), but the accuracy is still guaranteed in which a player can often pre-input the button by repeating it multiple times between the dealy of two events while continuing the same keystroke.

* Therefore, the benefit of using the "Autofire" should/(or must) overcome the common task that requires a continuous accuracy over repeated keystrokes and also to be able to repeat faster than it is by the default that of what it is being without.

- There is what is called, "pre-input" in which a programed-set often enables to recognize the input (a keystroke) being made beforehand that is prior to the action that follows while commanding the previous event (action). The fighting games are all designed to allow this due to the nature of its game play.

* For those, if you have either ever played or watched any Aracde Fighting games, we often see the "Combo Moves" in which a player uses a several pattern of directional movements to pre-input the command before pushing the button (inputting a keystroke) that finally allows the action to respond at the end.
- It only works if the combined of directional movement with the buttons are being input accurately without the obstacles; blocks, evade, counter attack.... etc. by the opponent)

- This type of practice not only requires the accuracy, but also the quickness of repeated keystrokes to be input before the event. The main reason is that it is simply impossible to count the numbers of frames (60fps) while playing a game. But there is always a limited frame delayed time that allows the next action to continue in which they are all being programmed in the game.

- For an example, if the "mid-air Jump+kick" must be done together in between of the delay 50/60fps and 40/60fps (0.8sec to 0.64sec), it only works if the input is being made between those times.

* But there is a catch to this which explains the "pre-input." that I have mentioned-above.

- Directonal movements such as Up/Left/Down/Right are not often required to be automated because those inputs can be only done for not more than once, otherwise it would be too late to go back to do it over if being mistaken since most of them must be done in a matter of 60fps or less, so Autofire would simply ruin the practice by overexceeding the numbers of inputs that shouldn't be made before pushing the buttons that allows a command of its action at the end of pre-input.

E.g..
1. Normal inputs = Foward~Down~Foward + Kick = Rising Attack
2. Automated inputs = Foward...fw.fw~Down..dn..dn.dn..Foward + kick = Error

Exceptional move is the spin move (360 degree) that a player only uses a joystick to rotate it repeately for a greater damage without the use of buttons that often takes the action to respond at the end of pre-inputs. In this case, directional movement can be automated as well, but not in gerneral.

* The experience eventually determines the accuracy of how well a player can get used to this type of pre-inputting practice. So, the point is that once these directional movement are being pre-input before the event, the action button (such as Kick, Punch, Guard... etc.) must be followed at the end of its pre-input command on exact timing in order to make it happen.

- That is how the Combo Move works as well. Nobody can count the numers of frames to see when to push the buttons or not, but the timing is often referred to as how or when to make these pre-inputs (directional movements), but the result is always based on the quickness as how quickly a player pushes the button on time at the end of the pre-input (directional movements).

* That is where the benefit of Autofire comes for.
Since you can not make a mistake while attepting to use the pre-input, the accuracy is only now based on how quickly you make that final input such as Kick, Punch , Guard,, etc. Most people at the Arcade would often mash the buttons for a couple of times very quickly as they are always assure of how pre-inputs being made before the event (Combo Moves... etc.)

- A good Arcade joystick is simply that has the most accuracy in the movement and the quickness in the buttons. The autofire simply guarantees the quickness without the delay, therefore, you do not need to mash the button in order to reduce the tension of having a dealy time between the keystroke due to the rule of 60fps in most fihging games.


I just put those extra comments in the quote, so I hope people are aware of this.

The above-script which was previously suggested by one of us here do work. It was to automate the MouseClick for some shooter games, but not for fighting games. I just simply switched the script into "~a" instead of "*$mbutton." to show that it would still work by simply modifying it into whatever the keystrokes that you want to use. The problem is that it just only repeates a single keystoke as it should be but not as accuractly as what Chris's script does. Of course, we can shorten the delay time by modifying the "Sleep" time down to "0" or "-1" which is supposed to be the fastest delay time and also causes an error in some case according to the "AutoHotkey Help file."

I think this script does cause an error, so I wanted to know how to modify Chris's script directly from its own. The script you suggested here simply doesn't even work at all and even if it works, it wouldn't without causing an error in which sometimes, the repeated keystroke is not constantly working on the exact pattern of loop; therefore, it is useless in a fighting game due to the nature of its game play that requires rather constant acuracy than a random response.

As far as I am concerned, Chris's script do work at some level except I haven't been able to test it rather than using a Right_MouseClick.

So, Chris!
Would you give me an example of "a", "NumPad8" or anything else other than "Right_MouseClick" in your own script unless someone else here can come up with a better script?

I know you have been very pateint to be helpful here and I have been still very appreciated of your effort, but I think it is about the time to solve this problem.

Btw, not only for Chris but for anyone else, you guys are very welcome to join in the discussion. please if you could. And I think we should someday add the Autofire in "Autohotkey Help File" by including some common information about how to set the Autofire into the script for gaming,......( just for a thought, lol)

foom
  • Members
  • 386 posts
  • Last active: Jul 04 2007 04:53 PM
  • Joined: 19 Apr 2006
1.)Why did you post another "Autofire" script created by me?
2.)My script works, if you'd look at it to see what it does instead of just c&p and run it with ahk you'd see that it works.
3.)Sleep cannot create a delay smaller than 10ms.

Hori
  • Members
  • 11 posts
  • Last active: Jun 26 2006 04:01 AM
  • Joined: 26 Apr 2006
1) I didn't know it was yours up until now, but I knew someone here posted it before. I did to show others what is the alternative that tested it beofre since one that does not work is the one you just posted here in the reply right after the my post in this thread.

2)The previous one that you have suggestedhere does work like I said, but you need to understand what I just said in "quote" (the above-mentioned) about playing a fighting game.

10ms is too slow but O.K considering as "Autofire" but not to mention, your script still seems to be inaccurate in terms of what I want to figure out here since for some reason, your working (tested) script does not work smoothly like what the "autofire" should be.

Since you are an expert at this, maybe you have experieneced playing some game on Emualtor like on MAME or Kawaks, in which I hope that is what you might want to use to test the script, I assume. Therefore, if you get to compare beween using AHK and built-in "Autofire" on MAME32k.64, you can feel the difference, and the move just often gets stuck that does not coordinate with "Autofire" during the pre-inputting with NumPads that I use 'em as directional movements (up/down/left/right), but Chris' script somehow works better in that sense, but yet it must be tested once I get the info. that I just have inquired here.

3)

Sleep can not create a delay smaller than 10ms

I understand that. So, that is also another reason that I wanted to point out the fact that your script is not designed for a fighting game which doesn't suit the purpose of using the "autofire" in the 1st place, but somehow, I think the message sounds a bit confused by my typo or something of whatever that I am not familiar with the term that we use in AHK. But the matter of a fact, Chris script, somehow. still works smoothly in a same sense in which I can not explain as what or what not since I am not an expert like you guys. But I wish I explained what I wanted to point out here though.


P.S... btw, thanks for your help, and I am not trying to criticize or anything if anything of what I said makes you feel wonder like "why a noob like myself would not understand a simple script that you have already figured out before and so now?" Because I have been working on this with Chris and he pointed out the fact that it must be more specified, and as I did, I found out that people should be aware of a thing or two about the "autofire" for a fighting game; otherwise, the currectly the script like yours only works as a automated key that simply repeats itself, but yet it is not efficiently designed (mapped) to fit the purpose of using the "autofire," as what I have described-above.

* I also understand both yours and his scripts seem almost identical as they are, but I can't explain it for further detail as why... due to my lack of knowledge in the use of AHK term.
The obvious error that I can say is that "tooltip" = O_o that you added to demonstrate the repeated key rate in a small pop-up screen while its AHK. being activated seems to cause some delay which makes the key response incoordeinately with non-Autofire keystrokes such as NumPads (in which I use for directional movements), although the repeated rate seems normal as it can be.

foom
  • Members
  • 386 posts
  • Last active: Jul 04 2007 04:53 PM
  • Joined: 19 Apr 2006
One thing to point out. You changed the hotkey to ~a and are sending a with it. In case you send the key which is the hotkey itself you have to specify $ in the hotkey definition so that the hotkey doesnt trigger itself. This was the case in my script before you changed it.

Ok i've tried to understand what you wrote but you write sentences without propper punktuation which make it hard to read. Please keep your sentences short.
I don't understand what you need autofire for when it breaks the chain of successive keypresses(e.g. Foward...fw.fw~Down..dn..dn.dn..Foward + kick). Btw don't complicate the matter of successive keystrokes which create a combo by refering to them as command and event and stuff. That are just successive presses in particular order.
Please explain what you want to do in simple and short sentences because else nobody understands what you want.

Senji
  • Guests
  • Last active:
  • Joined: --
can you make one for F11 key plzzz T.T

the one game i play does not repeat the action when i hold the key down
....and a skill i want to train...i have to sit there...pres....press....pressss

Blacky
  • Guests
  • Last active:
  • Joined: --
I implemented the script months ago, it worked fine, but now the mouse cursor appears at the upper left cornor of the desktop or turn left and up in game?! Any suggestions?

purloinedheart
  • Members
  • 538 posts
  • Last active: May 21 2013 04:13 AM
  • Joined: 04 Apr 2008

I implemented the script months ago, it worked fine, but now the mouse cursor appears at the upper left cornor of the desktop or turn left and up in game?! Any suggestions?


$RButton::
While GetKeyState("RButton","P")
 Send {RButton}
return
?

This is an old topic, you might want to look at newer 'autofire' threads