Skip to content
Advertisement

Tag: mouse

User needs to move mouse to fire bullet

When the user hits q to fire a bullet, there is no smooth motion. They need to move the mouse around the screen in order for the bullet to travel. I’ve tried looking around StackOverflow, youtube, reorganizing the code. I want the user to hit q and the bullet should fire with a parabola shape smoothly. Answer You’ve to do

Controlling mouse with Python

How does one control the mouse cursor in Python, i.e. move it to certain position and click, under Windows? Answer Tested on WinXP, Python 2.6 (3.x also tested) after installing pywin32 (pywin32-214.win32-py2.6.exe in my case):

Advertisement