[Solved] Player Duck
Hi
What is the best way to know if player is ducking? |
Re: Player Duck
By seeing if their buttons contain IN_DUCK
|
Re: Player Duck
Something like this?
PHP Code:
|
Re: Player Duck
If you print a message in that conditional statement it will print any time that it is true. It will be true the entire time that you are holding the button down (remember that it will execute really fast so what you may think is a single press is actually a long time relative to the computer).
If you only want the message to show when you first press the button then you need to save the previous value and compare it to the current value to detect the change of state. If you search you can find all the information you need. Amazing how that works. |
Re: Player Duck
Hum i used bool and now works fine :3
|
Re: Player Duck
Quote:
|
Re: Player Duck
Quote:
#define m_afButtonReleased 247 |
Re: Player Duck
Player is ducking when size if lower than standup size, if you want to detect that, you can check flags & FL_DUCKING
|
Re: Player Duck
Well its good how it is.
About bool i set Can_Duck false after ducks ;) |
Re: Player Duck
Quote:
|
| All times are GMT -4. The time now is 06:26. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.