Command Prompt Random Placeholders - KVonGit/quest5-stuff GitHub Wiki

In my Easter Eggs game, I have random placeholders in the text input field.

I added a string list attribute to my game object:

    <cmdprompts type="stringlist">
      <value>Happy Easter!</value>
      <value>This game was dyed in front of a studio audience.</value>
      <value>Please enter a command...</value>
      <value>No animals were harmed due to the making of EASTER EGGS.</value>
      <value>Lent is over!  (What did you do without?)</value>
      <value>Easter is the 1st Sunday after the 1st full moon during or after the Spring Equinox.</value>
      <value>Have you acquired the Jewel-encrusted Egg?</value>
    </cmdprompts>

image


Then I created (and enabled) a turn script:

  <turnscript name="command_prompt_randomness">
    <enabled />
    <script><![CDATA[
      if (not game.pov.currentcommand = null) {
        if (game.pov.currentcommand <> "quit") {
          cmdprompt = (PickOneString(game.cmdprompts))
          JS.setInterfaceString ("TypeHereLabel", cmdprompt)
        }
      }
    ]]></script>
  </turnscript>

image


...and that's all there is to it!


RELATED

Command Bar Styling

⚠️ **GitHub.com Fallback** ⚠️