Buttons in order
I'm trying to make a plugin where the user has to try to press certain buttons in a certain order (Order is random each time). I'm not sure how to go about either of these things. I'm not sure how I would get a random sequence of buttons, nor how to make sure that they press it in the wrong order, and they have to start over from the beginning if they get it wrong.
Any suggestions? |
Re: Buttons in order
Are you talking about buttons in a map?
|
Re: Buttons in order
Sorry, I meant buttons like IN_ATTACK and IN_JUMP, etc..
|
Re: Buttons in order
You can create an array containing those button bits and then randomize the items to get your random sequence. You can then check the buttons pressed at FM_CmdStart. When I have time I'll try to put this together for you.
|
Re: Buttons in order
It's not perfect but it works. I made it only detect the playable buttons (buttons in the array) but I can make it detect all IN_[X] buttons if you want. For example, IN_ATTACK2 is not in the list of playable buttons, if it says "Press Duck" and the player presses Attack2, the plugin will not say "Wrong button pressed." It will however notify you if you press one of the playable buttons.
PHP Code:
|
| All times are GMT -4. The time now is 14:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.