Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, dr_panther, Quad), 935 guests, and 3 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
mouse_valid #315189
03/13/10 18:58
03/13/10 18:58
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Can this command be used to make the windows mouse null outside of the game window?

I don't understand the manual example and haven't had any luck trying it out.

Thanks for any suggestions.

Re: mouse_valid [Re: JazzDude] #315196
03/13/10 19:43
03/13/10 19:43
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
No this flag does only indicate if the mouse pointer is in your application window or not.
It does not allow you to make the mouse "stick" to your game window.

But what you can do with this flag is: whenever a mouse click (e.g.) occures or you use mouse_force somewhere, you can check the mouse_valid flag before letting the action happen.
So if your character should only turn when the mouse pointer is inside the game window you could use the following snippet:
Code:
...
if(mouse_valid)
{
  my.pan += 8 * mouse_force.x * time_step;
}
...



Hope this explains it a little bit.

Re: mouse_valid [Re: Xarthor] #315202
03/13/10 20:34
03/13/10 20:34
Joined: Sep 2003
Posts: 733
Whitefish, Montana
JazzDude Offline OP
User
JazzDude  Offline OP
User

Joined: Sep 2003
Posts: 733
Whitefish, Montana
Yes, that explains it.
Thanks.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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