SetDevice
SetDevice

Changes the player's controller device

bSuccess = myPlayer.SetDevice( New_Device, Device_Index )
bSuccess = myPlayer.SetDevice( New_Device )

Return value
TRUE if the controller was changed successfully, otherwise FALSE.

Parameters
  • New_Device
    One of the following:
    • CONTROL_KEYBOARD1
      Uses the keyboard with arrow keys, shift and ctrl by default.
    • CONTROL_KEYBOARD2
      Uses the keyboard with WASD RF by default.
    • CONTROL_KEYBOARD3
      Uses the keyboard with YGHJ IK by default.
    • CONTROL_KEYBOARD4
      Uses the keyboard with number keypad by default (8462 07)
    • CONTROL_JOYSTICK
      Uses the joystick.
    • CONTROL_MOUSE
      Uses the mouse (near left of screen, right, etc. and left / right click)
  • Device_Index
    If New_Device is set to CONTROL_JOYSTICK, this is the index of the joystick to use.
Comments

The controller device can also be changed by the user at runtime via the menus.

See also
Player:GetDevice



JAM © 2005 no one in partiular
Project started by David Evans in 2005