| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
| Mouse button problem | |
|---|---|
| Tweet Topic Started: Jul 14 2006, 09:43 PM (439 Views) | |
| - | Jul 14 2006, 09:43 PM Post #1 |
|
Unregistered
|
I have started to make fps game, but I have problem with shooting. Sometimes when I hold mouse button down and jump same time, shooting stay on even if release mouse button. I use same code as DemoEdit.zip: if(MouseCheckButton(mb_left)) if(wait=0){ wait=6; shootid=instance_create(x,y,shoot); shootid.z=z+height;} if(wait>0) wait-=1; |
|
|
| Xeniczone | Jul 15 2006, 03:06 AM Post #2 |
|
Elite Member
![]() ![]() ![]() ![]() ![]() ![]()
|
I don't think this has to do with U3d, but have you tried a global mouse check. What that is saying is if you click that object if you used a global mouse check it will say if you click anywhere. You can find the accual code by looking in the help. |
Comcast sucks!
| |
![]() |
|
| Dr. Best | Jul 15 2006, 07:05 PM Post #3 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Try using keyboard_check_direct instead of MouseCheckButton. |
![]() |
|
| Evolver | Jul 16 2006, 06:27 PM Post #4 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Isn't that for keyboard? I have same problem. |
![]() |
|
| Dr. Best | Jul 16 2006, 07:28 PM Post #5 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
No, this particular function works for the mouse as well as for the keyboard. Is there maybe some variable used for two different things? |
![]() |
|
| Xeniczone | Jul 17 2006, 01:12 AM Post #6 |
|
Elite Member
![]() ![]() ![]() ![]() ![]() ![]()
|
|
Comcast sucks!
| |
![]() |
|
| Dr. Best | Jul 17 2006, 03:17 PM Post #7 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Just believe in me, it works (at least in GM5). Or if you don't believe it just try it. Start some Game Maker project in the debug mode (F6) and add these two expressions: keyboard_check_direct(mb_left) keyboard_check_direct(mb_right) And see what happens if you press a mouse button. |
![]() |
|
| Evolver | Jul 17 2006, 05:31 PM Post #8 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Thanks, it works.
|
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |







![]](http://z1.ifrm.com/static/1/pip_r.png)



10:34 AM Jul 11