Trying to code two player chess, but can't find the
commands for a Second Joystick anywhere in the documentation.
My first Joystic setup looks like this and works perfectly:
SetJoystickScreenPosition ( 100, GetVirtualHeight() - 100, 90 )
if(GetVirtualJoystickExists(1))
SetVirtualJoystickVisible(1,1)
SetButtonScreenPosition(1,GetVirtualWidth() - 50, 100, 80)
SetVirtualButtonSize(1,100,50)
SetVirtualButtonText(1,"Fire")
endif
yAxisMovement# = GetJoystickY()
xAxisMovement# = GetJoystickX()
if( abs(yAxisMovement#) > 0.1)
spriteX# = GetSpriteX(board_WhiteHandOpen)
spriteY# = GetSpriteY(board_WhiteHandOpen)
SetSpritePosition(board_WhiteHandOpen,spriteX#,spriteY# + 20* yAxisMovement#)
endif
if( abs(xAxisMovement#) > 0.1)
spriteX# = GetSpriteX(board_WhiteHandOpen)
spriteY# = GetSpriteY(board_WhiteHandOpen)
SetSpritePosition(board_WhiteHandOpen,spriteX#+ 20* xAxisMovement#, spriteY#)
endif
if(GetButtonPressed(1))
print("BOOM")
endif
1) How do I let the computer know it is looking for 2 joysticks?
2) What are the commands for recognising a second Joystick?
3) Are there own commands for each seperate joystick or do I just call for (1) or (2)...?
Our first game will soon be up on Steam, if you want to check it out, it's called Cubes of Death and realease will be 18th of October 2021.
Best Regards
-Jonas, Mad Hat Games