modified joystick, array and variables global, local and array get to allow pointers