Help with Wb3d_ButtonState
Blitz3D Forums/Blitz3D Programming/Help with Wb3d_ButtonState
| ||
How do you say if 1 button = another button? Like If Wb3d_ButtonState(button1) = Wb3d_ButtonState(button2) then.. |
| ||
If Wb3d_ButtonState(button1) And Wb3d_ButtonState(button2)Then Endif |
| ||
No, I meant whats the exact command for this? Because this didnt work. I want to know how to cancel the 2nd button if the 1st button has been pressed. |
| ||
Here's my code so far: |
| ||
Anyone? |
| ||
You mean like radio buttons? |
| ||
No. regular buttons. Wb3d_createbutton() is what i used. |
| ||
can anyone else help? =/ |
| ||
Well, I have no experience with Wb3d but from youre code example, you are only setting a local variable of Button4 to 0, not the ACTUAL Buttonstate. Of course I dunno what function would 'unpress the button, or set the state but the function should be something like this: Function is_pressed(button1, button2) firstbutton = WB3D_ButtonState(button1) secondbutton = WB3D_ButtonState(button2) If ((firstbutton) And (secondbutton)) ; WB3D_SetButtonState(button2,False) ; There should be a function to Set the button state to False? or 'Unpress'? Not sure what this is WB3D_Notify "","You can't select 2 particles at once.",0 EndIf End Function |