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.

CCOA UMS Adding Shortcuts in the Script

I know how to add shortcuts in each event through the script option, but I want the shortcuts to already be loaded into the game when it begins by having them written into the script itself. I have no idea how this is done or if this is even possible to do to the script. I just don't want to have to copy the event that sets all of my shortcuts to every map before I test the maps out.

The code, if you don't have it, is:
 
Scroll down or use Find (Ctrl-F) to where it says "@shortcuts = {}". Between the brackets, you can add in all your shortcuts. Remember to use proper syntax (quotation marks and commas).

By the way, note that this only works when the game starts up (in a New Game). If you load a save file previous to editing the shortcuts, they won't appear in game.

Also, you might want to look into finding a newer version of the script. I believe v1.8 is out somewhere? Although it seems like ccoa's been removing her scripts on other sites.
 
Sorry, but I'm a bit illiterate when it comes to Ruby syntax.
The in-game code for two of the shortcuts are:
$game_system.add_shortcut('\c1', '\nm[Mrs. Mijello]')
$game_system.add_shortcut('\c2', '\nm[Zack Mijello]')

So would the script be:
@shortcuts = "\c1", "\nm[Mrs.Mijello]"; "\c2", "\nm[Zack Mijello]";...}
 
That's close. You just use a comma instead of a semi-colon.
Here's an example:

Code:
@shortcuts = {'\c1', '\nm[Aluxes]',

              '\c2', '\nm[Basil]'

             }
 

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