Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to use a controler as a mouse #348534
11/27/10 22:30
11/27/10 22:30
Joined: Dec 2008
Posts: 222
janerwac13 Offline OP
Member
janerwac13  Offline OP
Member

Joined: Dec 2008
Posts: 222
My question how to use a controller as a mouse.
with the right analog stick you're moving the cursor and with A you "click".Dont know how to write this.
I tried it but i failed many times !
i hope u can help me. thx

Last edited by janerwac13; 11/27/10 22:30.
Re: how to use a controler as a mouse [Re: janerwac13] #348537
11/27/10 22:40
11/27/10 22:40
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
If you #include <windows.h> you can use the GetCursorPos and SetCursorPos functions to find and change the mouse position (respectively). If you google them, you'll see what kind of parameters they need.

You can use:
Code:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);


to send a mouse-click, but don't forget to also use:
Code:
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);


to simulate letting go of the mouse afterwards.

As long as you know how to get input from the controller, that should get you all set up.

Superku taught me those tricks, and I found them very useful for my game laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: how to use a controler as a mouse [Re: JibbSmart] #348539
11/27/10 22:49
11/27/10 22:49
Joined: Dec 2008
Posts: 222
janerwac13 Offline OP
Member
janerwac13  Offline OP
Member

Joined: Dec 2008
Posts: 222
How must i write this ?

Re: how to use a controler as a mouse [Re: janerwac13] #348575
11/28/10 13:42
11/28/10 13:42
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Do you know how to use a controller at all?

Jibb


Formerly known as JulzMighty.
I made KarBOOM!

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1