Using a player character

Knowledgebase / Using a Player character


The Player character from the Gamefroot Classic Pack has a Classic Platform Player Controls script attached to it. You can control the player character with the arrow keys to move it around, and shoot bullets* by pressing space bar (only if a bullet object is included in the game).

*Note: if a bullet object is not included in the game, then a warning message will appear at the start of the game.
To change its properties, right-click on it and select Instance Properties.
These are the properties you can change on the Player character:
  • Center Camera on Me: Set this to true if you want to make the camera follow the player.
  • Default Gravity X: The horizontal gravity strength (default is 0)
  • Default Gravity Y: The vertical gravity strength.
  • Walkspeed Per Second: The player’s walking speed.
  • Jump Velocity: The player’s jump speed.
  • Lives: The amount of times the player can die before losing the game.
  • Hand Offset X: The horizontal position of a weapon (relative to the player).
  • Hand Offset Y: The vertical position of a weapon (relative to the player).
  • Max Health: The highest amount of health the player can have.
  • Health: The starting amount of health for the player.
  • Snap Camera Dimensions: The maximum distance the camera can travel before it stops following the player.
  • Max Camera: Set this to true to make it so the camera can only travel a certain distance before it stops following the player.