There is Touch.X and Touch.Y
you could set a global variable called something like aim or target and update it every tick with
if mouse mode aim = angle(gun.X,gun.Y,Mouse.X,Mouse.Y)
if touch mode aim = angle(gun.X,gun.Y,Touch.X,Touch.Y)
Then fire in that direction ( aim )
I've been trying to implement this but can't get it to work. Could someone please post a screenshot or similar so I can see how this should look on an event sheet?