Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / let darkbaisc detect your mouse moving or clicking

Author
Message
Gamer Making
19
Years of Service
User Offline
Joined: 20th Sep 2006
Location: sitting at the comp programming
Posted: 15th Oct 2006 05:32
this is a code you should try out:

sync rate 30
sync on
do
cls
if mousemovex()>0 or mousemovey()>
print "you are moving the mouse"
endif
sync
if mouseclick()>0
print "you are clicking the mouse"
endif
sync
loop

Minh Tran
Profit
20
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 15th Oct 2006 17:11
Wow, that's very useful. Thanks!

common people are walking in line.

Mitsu Fly Ride.
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Oct 2006 17:22
I think you should post it in the Code Snippets board, and put it in code tags.
[ code ]
[/ code ]

^Without spaces

whipped6
19
Years of Service
User Offline
Joined: 31st Aug 2006
Location:
Posted: 15th Oct 2006 19:06
well if this code was for DP then it might work but not for DBC

here is the code for DBC


game creator
Bob_42
19
Years of Service
User Offline
Joined: 15th Sep 2006
Location: Guernsey
Posted: 15th Oct 2006 20:46
you do realise the orginal code does work for DBC...

Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 15th Oct 2006 22:48
You only need one "sync".

CreamPie
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 16th Oct 2006 00:36
whipped6,

???
Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 16th Oct 2006 03:54
Quote: "well if this code was for DP then it might work but not for DBC"


Dark Physics?! What is that supposed to mean, Gamer Making's code works fine!

Ummm...
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Oct 2006 04:25
the cls in the main loop creates another sync

take that out of the main loop and add a backdrop on prior to the main loop to activate 3d and it will show the text over the 3d if you ink and font it prior to the loop.

Login to post a reply

Server time is: 2026-07-07 11:20:23
Your offset time is: 2026-07-07 11:20:23