|
Post by alexmega on Mar 15, 2018 8:29:08 GMT -5
Good morning I would like to know how do I cancel or disable joypad or just a few buttons.? thank you
|
|
|
Post by wraith on Mar 15, 2018 14:08:14 GMT -5
Set a conditional to disable(0)/enable(1)...
active= "0 or 1"
if active then "j=joypad()" or "button_routine".
|
|
|
Post by Oruam on Mar 15, 2018 14:46:45 GMT -5
Set a conditional to disable(0)/enable(1)... active= "0 or 1" if active then "j=joypad()" or "button_routine". Could you please show a code example of this!?
|
|
|
Post by wraith on Mar 16, 2018 13:30:22 GMT -5
Could you please show a code example of this!? Active.bex (417 B)
|
|
|
Post by alexmega on Mar 16, 2018 18:55:03 GMT -5
thank you
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Mar 24, 2018 14:02:00 GMT -5
I usually poll the joystick at the top of the main program loop. Next I store the current joystick state in a variable.
That way I don't have to write code to ignore the joystick. I just use the last results in those variables when I actually need them.
|
|
|
Post by alexmega on Apr 16, 2018 12:51:10 GMT -5
I usually poll the joystick at the top of the main program loop. Next I store the current joystick state in a variable. That way I don't have to write code to ignore the joystick. I just use the last results in those variables when I actually need them.
|
|
|
Post by Oruam on Apr 21, 2018 19:06:10 GMT -5
Ifound a easy solution! Example:
c=j j=joypad(0)
Punch_ok = Punch=0 If J.5 and c.5 and Punch_ok then Punch=1 End If
If Punch then j.0=0 j.1=O j.2=0 j.3=0 Loadtiles Punch_sprite,128,1 else Punch=0 End If
|
|