For the first one if the value of CurrentWeap never exceeds 9 you could do this:
every tick
--- set animation frame to int(mid("0123345", CurrentWeap, 1))[/code:nqvtjblm]
Or you could do this if you want to handle double digit values:
[code:nqvtjblm]every tick
--- set animation frame to int(tokenat("0,1,2,3,3,4,5", CurrentWeap))[/code:nqvtjblm]
For the second bit I'd utilize key codes.
"1" has a key code of 49
"2" has one of 50
..
"9" has one of 57
You can make a simple capx to inspect the keycode values of certain keys if you wish or there's probably a reference online somewhere.
So basically you then can do this:
[code:nqvtjblm]on any key pressed
system: Keyboard.LastKeyCode is between values (49,57)
--- set CurrentWeap to Keyboard.LastKeyCode-49[/code:nqvtjblm]
Thanks for that! I'm still working out how to use mid, int, str, zeropad, etc, so this is really helpful to have it examplified for me. Is using every tick a good idea for this kind of thing? Would it be better practice if I only had things happen when they changed, either by putting it in a function or testing for a keypress? I could be wrong, just seeing if every tick is expensive in processing terms or not?