Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 1,592 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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 | chip programmers | 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