Raised This Month: $ Target: $400
 0% 

How to tell if a player is holding the fire button


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SamuraiBarbi
Senior Member
Join Date: Aug 2006
Location: United States
Old 11-03-2009 , 16:22   Re: How to tell if a player is holding the fire button
Reply With Quote #1

Thank you so much! There's still only one problem I can think of in order to prevent it from being 'buggy' How can I be sure that the player never released the fire button?

For example, a buggy thing that I could forsee being a possible problem is, if a player presses the fire button to shoot a pipe, releases the fire button and goes to press the fire button again as the previous pipe touches another player or a surface. It seems I need a method like what you've provided but I also need to be able to check if the player ever released the fire button.
SamuraiBarbi is offline
Send a message via AIM to SamuraiBarbi Send a message via MSN to SamuraiBarbi Send a message via Yahoo to SamuraiBarbi
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-04-2009 , 00:33   Re: How to tell if a player is holding the fire button
Reply With Quote #2

Quote:
Originally Posted by SamuraiBarbi View Post
Thank you so much! There's still only one problem I can think of in order to prevent it from being 'buggy' How can I be sure that the player never released the fire button?

For example, a buggy thing that I could forsee being a possible problem is, if a player presses the fire button to shoot a pipe, releases the fire button and goes to press the fire button again as the previous pipe touches another player or a surface. It seems I need a method like what you've provided but I also need to be able to check if the player ever released the fire button.
IN_ATTACK means button is pressed will fire each time it is pressed... how ever if you do it like ongameframe(in css) it will check constantly so if you release it it stops.
Doc-Holiday is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode