Jump to content

Constant Fire For Tag


88 replies to this topic

#21 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 12:56 PM

nope - "a down" is perfectly valid.

See the AutohotKey Key List.

Hmm, actually, letters arent in there, that list just lists special keys etc.
a-z work fine for the alphabet keys though

#22 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 01:00 PM

Ah hang on I forgot the major caveat.

In MWO, it does not properly recognise keys mapped to fire weapons.

So

Send {1}

does not work - it needs a delay between the key down and key up. Instead, use:

Send {1 down}
Sleep, 50
Send {1 up}

However, as this script is for HOLDING DOWN a button, this may not be needed.

I just realised - why am I being an ***** and binding it to MButton?
I should just have it send a number, then it simplifies it down a bunch - I can easily tell my mouse to send 6 instead of MButton for that button.

#23 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 15 January 2013 - 01:09 PM

Okay, thank you. I agree, since it should hold the button, it should work without the delay. But I will keep it in mind in case I ever need to input a number the normal way.


Final script:

TAGMode = 0

; If TAG Mode was toggled on in game, then the game quit before we turned it off,
; Make Wheeldown turn off TAG mode even outside the game
#IfWinNotActive, ahk_class CryENGINE
  ~Wheeldown::
    if (TAGMode ==1){
	  Send {5 up}
	  SetScrollLockState, Off
	  TAGMode = 0
    }
    Return
#IfWinNotActive

#IfWinActive, ahk_class CryENGINE
  ; Wheel Up is normal zoom
    Wheelup::
        Send {z}
        Return

;TAG Toggle
Wheeldown::
    if (TAGMode == 0){
        Send {5 down}
        SetScrollLockState, On
        TAGMode = 1
    } else {
        Send {5 up}
        SetScrollLockState, Off
        TAGMode = 0
    }

#IfWinActive


Forgot to change the part that disables TAG when MWO is not the active window.

Do you see any mistakes?

Edited by GODzillaGSPB, 15 January 2013 - 01:27 PM.


#24 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 03:48 PM

New version of the TAG toggle script:
http://evilc.com/fil...o/tagtoggle.ahk

New features:

Now ripped the zoom code out of the TAG toggle script so you can pick and choose what you do and dont want more easily.
If TAG is on when the scoreboard or map opens in MWO, it is turned off
-So this script compensates for that by disabling TAG while you hold Tab for scoreboard...
-And when you hit B for map, it disables TAG, then when you hit B again to close the map, it re-enables TAG

So now the macro hits 6 for TAG. You should be able to leave the macro to be holding down 6, but use another key (ie wheeldown) to trigger the macro - look in the code and it should be apparent which is which.
I have left the default trigger button to also be 6 - in my mouse software, I just set the button on my mouse I want to use to send 6.

Edited by evilC, 15 January 2013 - 03:50 PM.


#25 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 15 January 2013 - 05:33 PM

Hehe, you write something, reflect on it, and think - naah that sucks.

OK, new version up, same link: http://evilc.com/fil...o/tagtoggle.ahk

Now, when you run it, you get a GUI. Select the weapon group that contains TAG from the drop-down box. This is saved in a settings file, so if it doesnt change, you only need to do it once.

I went back to Middle Button to trigger TAG because separating the button used to trigger the toggle and the button that actually fires TAG makes it easier to distinguish between the two, less chance of people editing the wrong bit.

#26 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 01:51 AM

Very cool. Might I ask thoug...if you're going to this lenght, why not add an option to not only choose the weapon group for TAG, but also what mousebutton or which wheel direction wants to be used?

With the new complexity of the script, editing it manually could be a bit more tricky, couldn't it?

For now I will continue to use your older. modified script as it works good enough and uses wheeldown for TAG. :)

#27 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2013 - 03:08 AM

AutoHotkey does have a GUI item to set a hotkey, however, it only accepts keyboard hotkeys, not mouse or joystick.
This would be solvable with a bunch of radio and dropdowns (eg radio to select mouse, dropdown with mouse buttons 1-5, plus a radio for joystick, with two dropdowns - one for joystick number and one for button number) but then it starts to get really complicated.
Also, as you say, I am probably going a bit above and beyond the call of duty as-is, so I think it is best to leave it up to the end user to edit the script if they wish to change the trigger button.

Editing should be a bunch simpler - you only need change two places instead of four, and I have commented it REALLY clearly.

#28 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 03:53 AM

Yeah...but there are so many...letters. ;) Kidding. :)

#29 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 04:18 AM

Oh...I see your tagtoggle script is standalone, without any kind of zoom. Well I guess I could just add that from the other script. :)

#30 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 05:28 AM

Modified (added zoom, wheeldown for TAG) and tried your latest script, works like a charm. :) There might be a slight delay for zoom, but I guess we could never tell is this is the game or the script, right? Most of the functions are server-authorized anyway.

#31 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2013 - 06:04 AM

Hmm, I never noticed a delay in using zoom, and I am in the UK so have a high ping.
You didn't leave a sleep, 50 before the script hits zoom by mistake or anything?

I now have zoom as a separate script so that people can pick and choose which bits they want to use - there is nothing stopping you from having two AHK scripts running at one time (As long as they don't both try to use the same hotkey, then you might run into problems)

I also modded the zoom script such that it doesn't trap (Stop the game from seeing the wheel input) the wheelup and wheeldown buttons (I put a ~ before Wheelup: :) - Because the mouse wheel does nothing ingame, we may as well not trap it so that the wheel scrolls through stuff in the mechlab.
[Edit] I forgot to upload the new copy of the zoom script - just put a ~ before WheelUp:: and WheelDown:: if you want this feature. Will amend when I get home tonight,

Edited by evilC, 16 January 2013 - 06:06 AM.


#32 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 08:18 AM

Funny thing. After I put out the TAG in the last mech I had it in I too modified your first, original script to give me just zoom. :ph34r: I made it so that wheelup and wheeldown activates the zoom for a better logic. I found myself scrolling the wheel back when at maximum zoom anyway, so now that works. Two times forward, one time back to cancel the zoom, I like it. :D

Having a look at your new version, too.

#33 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2013 - 09:04 AM

I do actually have a "complex zoom" script that has "zoom in" and "zoom out" hotkeys - it keeps track of what zoom level you are at, and if, for example, you have zoomed in once and hit the zoom out key - it hits the zoom button twice.

I haven't found myself using it though, was too paranoid about it going out of synch with the game.

I will try and remember to add it to my script library (http://evilc.com/files/ahk/mwo) so you can have a play if you want.

Edited by evilC, 16 January 2013 - 09:05 AM.


#34 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 09:36 AM

View PostevilC, on 16 January 2013 - 09:04 AM, said:

I do actually have a "complex zoom" script that has "zoom in" and "zoom out" hotkeys - it keeps track of what zoom level you are at, and if, for example, you have zoomed in once and hit the zoom out key - it hits the zoom button twice.

I haven't found myself using it though, was too paranoid about it going out of synch with the game.

I will try and remember to add it to my script library (http://evilc.com/files/ahk/mwo) so you can have a play if you want.


I will definitely give it a go. This sounds sweet. :D

#35 stjobe

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 9,498 posts
  • LocationOn your six, chipping away at your rear armour.

Posted 16 January 2013 - 10:04 AM

For anyone who doesn't want to mess with AutoHotKey (not that there's anything wrong with it, I use it in several other games), here's a simple in-game method that'll almost always keep your TAG on if you want it:

* assign TAG to every weapon group you have weapons in
* assign TAG to a weapon group of its own

E.g. on one of my 'mechs I have
* Weapon group 1: Arm-mounted lasers and TAG
* Weapon group 2: Missiles and TAG
* Weapon group 3: TAG

This means I can use weapon group 3 to only use my TAG (if I want to be sneaky), but it also means I'll be lighting up any target I fire on with TAG.

It's not as good as a toggle, but it's quite usable and completely in-game.

#36 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 16 January 2013 - 10:29 AM

View Poststjobe, on 16 January 2013 - 10:04 AM, said:

For anyone who doesn't want to mess with AutoHotKey (not that there's anything wrong with it, I use it in several other games), here's a simple in-game method that'll almost always keep your TAG on if you want it:

* assign TAG to every weapon group you have weapons in
* assign TAG to a weapon group of its own

E.g. on one of my 'mechs I have
* Weapon group 1: Arm-mounted lasers and TAG
* Weapon group 2: Missiles and TAG
* Weapon group 3: TAG

This means I can use weapon group 3 to only use my TAG (if I want to be sneaky), but it also means I'll be lighting up any target I fire on with TAG.

It's not as good as a toggle, but it's quite usable and completely in-game.


This is a good idea, and I tried it, but often it doesn't work as good.

When you group it with ballistic weapons, it often doesn't connect to the target because you have to lead the target. Same goes for SRMs.

When you group it with lasers and you happen to play on Caustic or have a mech that generally runs hot, chainfire will break both TAG and the weapon group itself, since the game counts it as a regular weapon.

For LRMs and streaks...it would mostly work, yes.

The main problem for me was that I noticed how micromanaging more than 3 or 4 weapon groups really hurts my battle performance. So having just 3 weapon groups and a toggleable TAG was favorable for me. :D

#37 stjobe

    Member

  • PipPipPipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 9,498 posts
  • LocationOn your six, chipping away at your rear armour.

Posted 16 January 2013 - 11:14 AM

Yup, I noted in my post that it's not as good as a toggle. It's just an alternative if you for some reason don't want to run AHK.

Hopefully PGI gives us a proper toggle someday.

#38 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 16 January 2013 - 12:09 PM

New version of zoom and complex zoom as mentioned above have been uploaded to my script library.

#39 GODzillaGSPB

    Member

  • PipPipPipPipPipPipPipPipPip
  • 2,031 posts
  • LocationGermany

Posted 17 January 2013 - 02:13 AM

View PostevilC, on 16 January 2013 - 12:09 PM, said:

New version of zoom and complex zoom as mentioned above have been uploaded to my script library.


I tried it yesterday once, but for some reason it didn't work. It was the only script running. Is there something I must do for it to start working? In the game, zoom is normally set to "z". Maybe I have to change that?

Anyway...from what I've seen, the script seems indeed a bit...overcomplicated. I think I'd rather stay with the more easier version. No offence. :D

#40 evilC

    Member

  • PipPipPipPipPipPipPipPip
  • Legendary Founder
  • Legendary Founder
  • 1,298 posts
  • LocationLondon, UK

Posted 17 January 2013 - 04:34 AM

D'oh, yeah my script is set to use Q. Sorry about that.

I agree about the complexity, hence I don't even use it myself.
Was more an exercise to see how it would handle if it was done...

Edited by evilC, 17 January 2013 - 04:35 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users