BrettF Posted March 24, 2007 Posted March 24, 2007 Hi.... I'm attempting to make a shooting game (like Duck Hunt) I'm trying to implemet different things.... But first: My questions: How can I get the centre of an image (a gif), to follow the mouse??? I have done a search but nothing turned up well.... Thanks, Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Shevilie Posted March 24, 2007 Posted March 24, 2007 Why not just change the mousepointer ??? Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit
BrettF Posted March 24, 2007 Author Posted March 24, 2007 Why not just change the mousepointer ???Hmm.... Good point Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
BrettF Posted March 24, 2007 Author Posted March 24, 2007 Hmm.... Good pointHmmm...... Im thinking it's too small. I did make a custom crosshair. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Lakes Posted March 24, 2007 Posted March 24, 2007 Have a look here.. http://www.autoitscript.com/forum/index.php?showtopic=38549 last post is my Breakout game. 2015 - Still no flying cars, instead blankets with sleeves.
jvanegmond Posted March 24, 2007 Posted March 24, 2007 #include <GUIConstants.au3> $Main = GUICreate("Game",800,600) GUICtrlCreateButton("Press ESC to close",300,200,200,200) $ImageWidth = 68 $ImageHeight = 71 $ImageFile = @Systemdir & "\oobe\images\merlin.gif" $Crosshair = GUICreate("Crosshair", 68, 71, 10, 10,$WS_POPUP,$WS_EX_LAYERED,$Main) GUICtrlCreatePic($ImageFile,0,0, $ImageWidth,$ImageHeight) GUISetState(@SW_SHOW,$Main) GUISetState(@SW_SHOW,$Crosshair) While GUIGetMsg() <> $GUI_EVENT_CLOSE UpdateCrosshair() Sleep(10) WEnd Func UpdateCrosshair() $Mouse = MouseGetPos() If Not @error Then WinMove($Crosshair,"",$Mouse[0]-($ImageWidth/2), $Mouse[1]-($ImageHeight/2)) EndIf EndFunc github.com/jvanegmond
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now