Introduction Text Issue

Having another problem with coding. Again. Trying to have the game start out with an introductory description that states basically the start of the plot. I tried the documentation on adding introduction text but I cannot really understand it at all. I try to add in a variable for the script to call a function yet I keep getting errors. Is there a way to get an intro going?


'game' Game Settings Object (left side's 'tree of stuff', click on 'game' so it is highlighted)

now on the right side, you're (currently defaulted) on the/seeing the 'setup' Tab (at the top) for the 'game' Game Settings Object

click on the 'Script' Tab (at the top), so that you're now seeing that/this-new stuff on the right side

for the 'Start' script (which is what we want, as this 'game.start' Script Attribute does it's scripts at the start of the game, before you're able to do anything and/or before anything else is done by the game, making it perfect for doing an introduction and/or character creation):

add new script -> 'output' section/category -> 'print a message' Script -> (see below)

print [MESSAGE] TYPE_IN_YOUR_INTRODUCTION_HERE

example:

print [MESSAGE] hi, welcome to my game, I hope you enjoy it!


I'm pretty sure you can use the:

<br>

as part of your typing of your introduction for creating line breaks (blank lines), so you can have paragraphs. You might have to do two of them (not sure if you only got to do one or two --- I've not used them yet myself, lol) to produce a blank line between your paragraphs:

<br><br>

also, if you're getting an error....

than change the [MESSAGE] to [EXPRESSION], and then have your entire introduction text within double quotes:

print [EXPRESSION] "hi, welcome to my game, I hope you enjoy it!"

btw, in code, it looks like this (regardless if you used the [MESSAGE] and no double quotes, or the [EXPRESSION] with the double quotes):

msg ("hi, welcome to my game, I hope you enjoy it!")

and in "full" (just the 'game' Game Settings Object):

// blah stuff

<game name="NAME_OF_YOUR_GAME">
  // blah stuff (Attributes)
  <attr name="start" type="script">
    msg ("hi, welcome to my game, I hope you enjoy it!")
  </attr>
  // blah stuff (Attributes)
</game>

// blah stuff

examples using the line break command:

print [MESSAGE] hi, welcome to my game, I hope you enjoy it!<br>This is my first game, it's a simple "rock paper scissors" game.<br>Rock Paper Scissors Game<br>by Hegemon Khan

print [EXPRESSION] "hi, welcome to my game, I hope you enjoy it!<br>This is my first game, it's a simple "rock paper scissors" game.<br>Rock Paper Scissors Game<br>by Hegemon Khan"

print [MESSAGE] hi, welcome to my game, I hope you enjoy it!<br><br>This is my first game, it's a simple "rock paper scissors" game.<br><br>Rock Paper Scissors Game<br><br>by Hegemon Khan

print [EXPRESSION] "hi, welcome to my game, I hope you enjoy it!<br><br>This is my first game, it's a simple "rock paper scissors" game.<br><br>Rock Paper Scissors Game<br><br>by Hegemon Khan"

if you're wondering about the 'br', it's a command from xml/html (web/online programming languages):

ht.tps://www.w3schools.com/
(remove the dot/period from the ht.tps above for link to work in the url)

if you want to learn it, and/or just be familiar with some of its various commands, some of which can be used by quest, like the line break (br) command

also, quest's 'tag' (<,>) structure part of its coding (its "physical" stuff) is the same 'tagging' (<,>) as is used by xml/html


Took a while but I got the whole message and
to work. Thanks Khan!


Oh there is one thing I have to ask though. I don't see Game Settings Object or Game Options or whatever its called.


The game object is in the hierarchy in the left pane, the second thing down from the top, under Objects.


here's the left side's 'tree of stuff' for a new game:

(well, something like this, as I don't have quest open and am going off of my memory of it)

Objects
-> game <------ this is the 'game' Game Settings Object. This is a special required Object that has controls/settings/options for many global (game-wide) stuff, as well as the toggle controls for what Tabs are hidden(not usable)/shown(usable) due to them cluttering up the GUI/Editor, and also the settings for info on your game for people looking whether to download and play it or not when you have it published online (author, version = version history, first published, category: rpg/sci-fi/fantasy/simulator/educational/adult/etc, difficulty, cruelty, description = description of game, etc etc etc), and it also has the special 'start' Script Attribute, which is the first thing done when your game begins, making it great for an introduction and/or character creation, for examples.
->-> Verbs
->-> Commands
-> room
->-> player
Functions
Timers
Advanced
-> Libraries
->-> English.aslx // for the english language version download of quest
->-> Core.aslx
-> Object Types (Types)
-> JS (JavaScript)
.
.
.
.
Filter -> Show Library Elements -> (toggle/check it on/in or off/not-checked-in)

and in code, here's what the 'game' Game Settings Object (for a new game) looks like:

<game name="NAME_OF_YOUR_GAME">
  <gameid>SOME_RANDOMLY_GENERATED_HAS_STRING</gameid>
  <version>1.0</version>
  <firstpublished>2017</firstpublished>
  // etc Attributes that you got to setup/fill-in yourself (or not, you don't have to do so):
  // author
  // description
  // category
  // difficulty
  // cruelty
  // the 'start' Script
  // etc Attributes
</game>

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums