Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
Hugo By Example
  • Main Page
  • About
  • Index
    • Main Page
    • Introduction
    • Getting Started
    • Hugo Games
    • Index

    player

    player is a hugolib.h-defined global variable that points to the [player character object. This is done in the init routine that sets up the game, but it can be changed at any point (if you are writing a game with character-switching).

    Of course, setting the player global variable in init is what lets all of your routines and things refer to the player as “player”.

    Categories: Global Variables

    © 2025 Hugo By Example (CC BY). Powered by Jekyll & Minimal Mistakes.
    GitHub repository