<game name="blah">
</game>
<turnscript name="game_over_global_turnscript">
<enabled />
<script>
if (player.life <= 0) {
msg ("You died or were killed.")
msg ("GAME OVER")
finish
}
</script>
</turnscript>
{tab indent}This paragraph is a block in the English language. Blah blah blah xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx blah blah blah content. This is the end of the block.{the period to the left marks the end of the block}
<Element name="xxx" {etc optional or non-optional tag attributes}>{the contents}</Element>
<Element name="xxx" {etc optional or non-optional tag attributes}>
// the contents
</Element>
the~a game file's block (your game's entire code):
// the game file itself (this has nothing to do with this code stuff), has the extension of: *.aslx
<asl version="###">
// {mass of your game code's contents}
</asl>
the~a library file's block:
// the library file itself (this has nothing to do with this code stuff), has the extension of (the same as a game file): *.aslx
<library>
// {mass of your library's contents}
</library>
the special 'game' Game Object (for your game's global settings~options):
<game name="xxx">
<gameid>xxx</gameid>
<author>xxx</author>
<description>xxx</description>
<subtitle>xxx</subtitle>
<version>xxx</version>
<firstpublished>xxx</firstpublished>
<category>xxx</category
<difficulty>xxx</difficulty>
<cruelty>xxx</cruelty>
<pov type="object">xxx</pov>
<start type="script">
// scriptings (action~event code lines~blocks)
</start>
// etc Attributes
</game>
Objects:
<object name="xxx">
// Attributes and~or other Objects
</object>
Attributes (the various syntaxes, and~or shortened syntax forms, make these a bit complicated~confusing):
horizontally:
<attr name="xxx" type="xxx">value~contents</attr>
// or (vertically):
<attr name="xxx" type="xxx">
// value~contents
</attr>
// etc Elements' tag blocks
a new (default) game code:
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="xxx">
<gameid>xxx</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
InfectedBehaviour wrote:Hi I'm new to Quest. Been working on a game for almost two months now.
I've already gotten some random messages to appear in my game but now I need to do it in a different way. I'm trying to add roughly over 500 messages, so the player doesn't get tired reading the same messages over and over again.
This is a pretty room. You can see {random:balloons:a mouse wearing a hat:a pigeon pecking at the window}.
I tried adding an "if" statement with a random chance but since I added to many messages, Quest froze every time I tried going to that tab. I fixed that now.
The Pixie wrote:
I am not sure quite what you mean, but if you want random messages to appear every now and again without the player typing anything, see this tutorial page:
http://docs.textadventures.co.uk/quest/ ... ripts.html
If you want to change around what the player sees when he does type some, say in a room description, use the text processor. A description might look like this, with the random bits in the curly braces:This is a pretty room. You can see {random:balloons:a mouse wearing a hat:a pigeon pecking at the window}.
You just type that into the room description as normal.I tried adding an "if" statement with a random chance but since I added to many messages, Quest froze every time I tried going to that tab. I fixed that now.
How many is that? Could you post your code so we can see it and see if that is the problem? If the game will still play, it could well be the GUI struggling to display multiple nested if statements, but there might be a better way to do it.
I. xxx
A. xxx
1. xxx
a. xxx
(1). xxx
(A). xxx
if (xxx) {
if (xxx) {
if (xxx) {
if (xxx) {
if (xxx) {
}
}
}
}
}
I. xxx
A. xxx
1. xxx
a. xxx
(1). xxx
(A). xxx
2. xxx
a. xxx
(1). xxx
(A). xxx
B. xxx
1. xxx
a. xxx
(1). xxx
(A). xxx
II. xxx
A. xxx
1. xxx
a. xxx
(1). xxx
(A). xxx
2. xxx
a. xxx
(1). xxx
(A). xxx
B. xxx
1. xxx
a. xxx
(1). xxx
(A). xxx
if (xxx) {
if (xxx) {
if (xxx) {
}
}
} else if (xxx) {
if (xxx) {
if (xxx) {
}
}
} else {
}
if (xxx) {
if (xxx) {
}
} else if (xxx) {
if (xxx) {
if (xxx) {
}
}
} else {
}