Player
Player

JAM contains 4 default Player objects called Player1, Player2, Player3 and Player4. These objects can be assigned input devices, and can be set to control object movements. Player objects can also keep track of scores and lives.

Creation
 
PlayerCreates a new Player object
Functions
 
Score & lives
SetScoreSets the player's score
AddToScoreAdds to the player's score
GetScoreReturns the player's score
SetLivesSets the player's lives
AddToLivesAdds to the player's lives
GetLivesReturns the player's lives
Input devices
IsJoystickConnectedChecks if the given joystick number is currently attatched
SetDeviceChanges the current input device
SetLeftChanges the current key (keyboard) or strength (joystick) to move left
SetRightChanges the current key (keyboard) or strength (joystick) to move right
SetUpChanges the current key (keyboard) or strength (joystick) to move up
SetDownChanges the current key (keyboard) or strength (joystick) to move down
SetFireChanges the current key (keyboard) or button (joystick) to fire
SetJumpChanges the current key (keyboard) or button (joystick) to jump
GetLeftReturns the current key (keyboard) or strength (joystick) to move left
GetRightReturns the current key (keyboard) or strength (joystick) to move right
GetUpReturns the current key (keyboard) or strength (joystick) to move up
GetDownReturns the current key (keyboard) or strength (joystick) to move down
GetFireReturns the current key (keyboard) or button (joystick) to fire
GetJumpReturns the current key (keyboard) or button (joystick) to jump
IsLeftReturns the level of left movement (from 0 to 65535)
IsRightReturns the level of right movement (from 0 to 65535)
IsUpReturns the level of upwards movement (from 0 to 65535)
IsDownReturns the level of downwards movement (from 0 to 65535)
IsFireReturns TRUE if the fire key/button is pressed
IsJumpReturns TRUE if the jump key/button is pressed



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