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 / Single shoot

Author
Message
wh1sp3r
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Czech republic
Posted: 23rd Mar 2004 21:45 Edited at: 23rd Mar 2004 21:46
when i hold mousebutton, i want only single shoot .. how on it ?

☺☺ PIII 950 Mhz, 320 MB RAM, GeForce4MX440 64MB, SB LIVE!, monitor 19" ☺☺
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 23rd Mar 2004 22:09 Edited at: 23rd Mar 2004 22:10


don't copy paste that code, it won't work instead try and understand why the "shoot" is only initiated once everytime you hold the mouse button.

Peter H
21
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 23rd Mar 2004 22:20
the reason that you're getting more then one shot per mouse click is that you shoot every cycle that you have the mouse held (at least that what i'm assuming your program does ) so do what Hexgear says except i usually use the variable "Hold(insert name of key\mouse button here)" instead of "Key"

You know, when i see an old lady slip and fall on the side walk, my first instinct is to luagh, but then i think, what if i where an ant? and she fell on me, it just doesn't seem so funny anymore.

Login to post a reply

Server time is: 2025-05-31 17:42:31
Your offset time is: 2025-05-31 17:42:31