Page 1 of 1

Tweaking Rearmer

Posted: Thu Jan 02, 2014 7:41 pm
by Devlin
I have it set up so rearmer works when you switch weapons by checking for a change in wep damage. However, sometimes it doesn't go off, which means you need to toggle a weapon on/off for it to rearm your ability (which means the problem can keep happening indefinitely, theoretically. I usually get it after 1-2 tries, IF it does fail.) I. I've tinkered with the wait timer in the damage check with mixed results, yet haven't got it to be perfect.

I'm trying to do one of two things
-Fix the damage check so it never fails to rearm when you switch weapons.
-Add a feature to the onhotkey function which will rearm the ability instead of having to toggle on/off (if the first can't be achieved.)

Any input would be greatly appreciated. This is the section of code I'm toying with.

Code: Select all

if ( Abs ( %min - #minDmg ) > 15 ) || ( ( %max <> #maxDmg ) > 15 ) ;|| ( Abs (%max - %maxDmg ) > 15 )
          {
               gosub Settings ; saves pixels of icons
               ;wait 5
               set %min #minDmg
               set %max #maxDmg
               goto loop:
          }
          onhotkey %Prim
          {
               set %Sub Prim
               event exmsg #charid 3 0 [Primary]
               event sysmessage Primary Ability activated
          }
[/size]