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.

question here!

Aran

Member

oo... sry! that was my damn computer again. i meant to ask

if i wanted to create a command window with an unspecified amount of options what would the code be?

Array.each perhaps?
 
In what manner do you mean "unspecified amount"?
As you already pass an array to the initialize-methode of Window_Command you can pass as many commands as you would like.
Normaly when you create the command-window you create an array with the exact commands you need. But you can use every array that contains only strings.

So what do you want to know? With Array#push you can add additional objects to an arry (they are inserted after the currently last object). If you want to change the amount of commands after the window is created, this not possible without editing the Window_Command-class. One workaround could be disposing and then recreating the window, though i'm not sure this is possible without errors.

With Array#each you iterate over every item in the array, but i don't know if this it was you really need.
 

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