Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

In depth Tutorial on Controls with RGSS

Hey there, I'm new to RGSS("RUBY") and well I find the language easy to learn but the controls are kinda bugging me. Is there any in depth tutorials on controls for RGSS?

Thanks.
 

poccil

Sponsor

The system used by RGSS is to update the input controls only when explicitly requested, in this case through a call to Input.update.  It is part of the normal update loop in a scene.  Calling Input.trigger? determines whether a button was just pressed.

Code:
loop do
  # Updates the graphics
  Graphics.update
  # Updates input
  Input.update
  if Input.trigger?(Input::C)
    # C button was pressed
    print("C button was pressed")
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top