<game name="blah">
// blah code lines
<attr name="global_turns_of_game" type="int">0</attr>
// blah code lines
<game>
<turnscript name="global_turnscript_of_the_entire_game">
<enabled />
<script>
msg (game.global_turns_of_game)
msg (room.local_turns_of_room)
game.global_turns_of_game = game.global_turns_of_game + 1
</script>
</turnscript>
<object name="room">
<inherit name="editor_room">
<attr name="local_turns_of_room" type="int">0</attr>
<turnscript name="local_turnscript_of_room">
<enabled />
<script>
room.local_turns_of_room = room.local_turns_of_room + 1
</script>
</turnscript>
</object>
<object name="Archeological Site">
<inherit name="editor_room" />
<exit alias="north" to="Sprawling Desert">
<inherit name="northdirection" />
</exit>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<turns type="int">0</turns>
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
</statusattributes>
<look>I'm an idiot. Weak, lazy, dumb, etc.</look>
<ask type="scriptdictionary">
<item key="me myself">
msg ("You say to yourself, \"People love me because I am the best Xanadu Magoo that I can be.\"")
</item>
</ask>
</object>
</object>
<object name="Small Stream">
<inherit name="editor_room" />
<exit alias="southwest" to="Cliff Base">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="Sprawling Desert">
<inherit name="editor_room" />
<description><![CDATA[<br/>There is a lot of sand here, some of it forming some sand dunes.<br/><br/>You hear some voices, but no matter how hard you try, you cannot tell what direction they are coming from.<br/><br/>Back to the west you see a cliff rising up from the horizon. If you look toward the south, you see a few small mounds peaking up from the desert floor. A sandy, blown over path appears to continue to the east. The desert appears to expand endlessly in all other directions.]]></description>
<enter type="script">
EnableTurnScript (SDTS)
</enter>
<onexit type="script"><![CDATA[
msg ("<br/>The voice fades until you can no longer hear the speaker.<br/>")
DisableTurnScript (SDTS)
]]></onexit>
<object name="sand">
<inherit name="editor_object" />
<takemsg>You try to pick up the sand, put it slips through your fingers.</takemsg>
<weight type="int">5</weight>
<attr name="feature_usegive" type="boolean">false</attr>
<ondrop type="script"><![CDATA[
msg ("<br/>You drop the sand and it is blown away by the wind.")
MoveObject (sand, Sprawling Desert)
]]></ondrop>
</object>
<command name="sprawling desert suicide">
<pattern>kill myself; commit suicide; bite the bullet; tap out; kill xanadu</pattern>
<script><![CDATA[
msg ("<br/>You take the figurative saying \"Go pound sand\" literally. You pound sand with your head. Over and over and over again. You succeed in pounding sand. Congratulations.<br/><br/>PS. I'm not sure you should take that saying literally...<br/>")
DecreaseHealth (100)
finish
]]></script>
</command>
<exit alias="west" to="Cliff Base">
<inherit name="westdirection" />
</exit>
<exit alias="south" to="Archeological Site">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="Dry Path">
<inherit name="eastdirection" />
</exit>
<command name="endless sand directions">
<pattern>sw; nw; n; ne; se</pattern>
<script><![CDATA[
msg ("<br/>The sprawling desert seems to expand for an eternity in this direction. You realize that wandering into this massive desert would certainly be the death of you. You wisely turn around and head back the way you came.<br/><br/>There is a lot of sand here - that is about it.<br/><br/>You hear some voices, but no matter how hard you try, you cannot tell what direction they are coming from.<br/><br/>Back to the west you see a cliff rising up from the horizon. If you look to the south, you see a few small mounds peaking up from the desert floor. A sandy, blown over path appears to continue to the east. The desert appears to expand endlessly in all other directions.<br/>")
]]></script>
</command>
<object name="Sand Dune">
<inherit name="editor_object" />
<look>There is a sand dune here that is about three feet tall and five feet wide.</look>
<scenery type="boolean">false</scenery>
<takemsg>Uh... that's about two tons of sand. You can't take it!</takemsg>
<hidebehind type="script"><![CDATA[
msg ("<br/>You just manage to tuck yourself away behind the sand dune.<br/>")
MakeObjectInvisible (player)
if () {
}
]]></hidebehind>
</object>
<command name="listen SD">
<pattern>listen; listen to voices; listen to sounds</pattern>
<script><![CDATA[
msg ("<br/>You cannot tell what the voices are saying. They are too faint.<br/>")
]]></script>
</command>
<command name="hide from bad guy">
<pattern>hide; hide behind dune</pattern>
<script>
MoveObject (player, hiding behind sand dune)
</script>
</command>
</object>
<object name="Dry Path">
<inherit name="editor_room" />
<description><![CDATA[<br/>There is a narrow path on the ground here running west to northeast. The desert seems to fade heading toward the northeast. You could also west from here, back into the large desert.<br/><br/>On the path, you see a little knob of wood poking out of the ground. It looks like it might be a root, but you don't see a tree anywhere for miles.]]></description>
<object name="root">
<inherit name="editor_object" />
<look>It just appears to be a little, knotted root that has poked up from the desert floor.</look>
<takemsg>As hard as you try to pull on the root, it will "knot" budge...</takemsg>
</object>
<exit alias="west" to="Sprawling Desert">
<inherit name="westdirection" />
</exit>
</object>
<verb>
<property>hidebehind</property>
<pattern>hide behind</pattern>
<defaultexpression>"You can't hide behind " + object.article + "."</defaultexpression>
</verb>
<object name="hiding behind sand dune">
<inherit name="editor_room" />
<descprefix>You are</descprefix>
<description><![CDATA[<br/>You have hidden yourself behind the sand dune in the sprawling desert. You cannot go anywhere except back into the sprawling desert. You sense that there is someone walking around just on the other side of the sand dune. <br/><br/>To return to the sprawling desert, you'll need to 'unhide' or 'emerge'.]]></description>
<exit alias="out" to="hiding behind sand dune">
<inherit name="outdirection" />
<lookonly />
<look>You peek out from behind the sand dune and see a scary looking man. This is definitely the man who fired the rocket at you back in the Rover. You know this because you would never forget that face. His eyes are beady and weasel-like, and he has a big, hooked nose like a massive bird of prey. He is also carrying a rocket launcher. He is wearing a traditional desert robe. Just before you duck back behind the sand dune, you catch a glimpse of a red "D" emblazoned on his black robe.</look>
</exit>
<command name="emerge unhide">
<pattern>emerge; unhide</pattern>
<script>
MoveObject (player, Sprawling Desert)
</script>
</command>
</object>
<turnscript name="SDTS">
<script><![CDATA[
SetTurnTimeout (2) {
msg ("<br/>The voice seems to be getting a bit louder...<br/>")
}
SetTurnTimeout (4) {
msg ("<br/>The voice you've been hearing is clear and audible now, but it's in a foreign language and you can't make out what is being said.<br/>")
}
SetTurnTimeout (6) {
msg ("<br/>The voice is so close, you are amazed you can't see the person issuing it. The voice sounds like one of the men that was at the top of the cliff just a while ago.<br/>")
}
SetTurnTimeout (7) {
msg ("<br/>Bad Guy Number One emerges in the sprawling desert. He drops his phone he has been using and readies his rocket launcher. The last thing you remember is the tip of the fired rocket stricking you in the knee cap. It has turned you into vulture kibble. At least you went out with a bang!<br/>")
DecreaseHealth (100)
finish
}
<object name="Archeological Site">
<inherit name="editor_room" />
<exit alias="north" to="Sprawling Desert">
<inherit name="northdirection" />
</exit>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<turns type="int">0</turns>
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
</statusattributes>
<look>I'm an idiot. Weak, lazy, dumb, etc.</look>
<ask type="scriptdictionary">
<item key="me myself">
msg ("You say to yourself, \"People love me because I am the best Xanadu Magoo that I can be.\"")
</item>
</ask>
</object>
</object>
<object name="Small Stream">
<inherit name="editor_room" />
<exit alias="southwest" to="Cliff Base">
<inherit name="southwestdirection" />
</exit>
</object>
<object name="Sprawling Desert">
<inherit name="editor_room" />
<description><![CDATA[<br/>There is a lot of sand here, some of it forming some sand dunes.<br/><br/>You hear some voices, but no matter how hard you try, you cannot tell what direction they are coming from.<br/><br/>Back to the west you see a cliff rising up from the horizon. If you look toward the south, you see a few small mounds peaking up from the desert floor. A sandy, blown over path appears to continue to the east. The desert appears to expand endlessly in all other directions.]]></description>
<enter type="script">
game.pov.turns = 0
EnableTurnScript (SDTS)
</enter>
<onexit type="script"><![CDATA[
msg ("<br/>The voice fades until you can no longer hear the speaker.<br/>")
DisableTurnScript (SDTS)
game.pov.turns = 0
]]></onexit>
<object name="sand">
<inherit name="editor_object" />
<takemsg>You try to pick up the sand, put it slips through your fingers.</takemsg>
<weight type="int">5</weight>
<attr name="feature_usegive" type="boolean">false</attr>
<ondrop type="script"><![CDATA[
msg ("<br/>You drop the sand and it is blown away by the wind.")
MoveObject (sand, Sprawling Desert)
]]></ondrop>
</object>
<command name="sprawling desert suicide">
<pattern>kill myself; commit suicide; bite the bullet; tap out; kill xanadu</pattern>
<script><![CDATA[
msg ("<br/>You take the figurative saying \"Go pound sand\" literally. You pound sand with your head. Over and over and over again. You succeed in pounding sand. Congratulations.<br/><br/>PS. I'm not sure you should take that saying literally...<br/>")
DecreaseHealth (100)
finish
]]></script>
</command>
<exit alias="west" to="Cliff Base">
<inherit name="westdirection" />
</exit>
<exit alias="south" to="Archeological Site">
<inherit name="southdirection" />
</exit>
<exit alias="east" to="Dry Path">
<inherit name="eastdirection" />
</exit>
<command name="endless sand directions">
<pattern>sw; nw; n; ne; se</pattern>
<script><![CDATA[
msg ("<br/>The sprawling desert seems to expand for an eternity in this direction. You realize that wandering into this massive desert would certainly be the death of you. You wisely turn around and head back the way you came.<br/><br/>There is a lot of sand here - that is about it.<br/><br/>You hear some voices, but no matter how hard you try, you cannot tell what direction they are coming from.<br/><br/>Back to the west you see a cliff rising up from the horizon. If you look to the south, you see a few small mounds peaking up from the desert floor. A sandy, blown over path appears to continue to the east. The desert appears to expand endlessly in all other directions.<br/>")
]]></script>
</command>
<object name="Sand Dune">
<inherit name="editor_object" />
<look>There is a sand dune here that is about three feet tall and five feet wide.</look>
<scenery type="boolean">false</scenery>
<takemsg>Uh... that's about two tons of sand. You can't take it!</takemsg>
<hidebehind type="script"><![CDATA[
msg ("<br/>You just manage to tuck yourself away behind the sand dune.<br/>")
MakeObjectInvisible (player)
if () {
}
]]></hidebehind>
</object>
<command name="listen SD">
<pattern>listen; listen to voices; listen to sounds</pattern>
<script><![CDATA[
msg ("<br/>You cannot tell what the voices are saying. They are too faint.<br/>")
]]></script>
</command>
<command name="hide from bad guy">
<pattern>hide; hide behind dune</pattern>
<script>
MoveObject (player, hiding behind sand dune)
</script>
</command>
</object>
<object name="Dry Path">
<inherit name="editor_room" />
<description><![CDATA[<br/>There is a narrow path on the ground here running west to northeast. The desert seems to fade heading toward the northeast. You could also west from here, back into the large desert.<br/><br/>On the path, you see a little knob of wood poking out of the ground. It looks like it might be a root, but you don't see a tree anywhere for miles.]]></description>
<object name="root">
<inherit name="editor_object" />
<look>It just appears to be a little, knotted root that has poked up from the desert floor.</look>
<takemsg>As hard as you try to pull on the root, it will "knot" budge...</takemsg>
</object>
<exit alias="west" to="Sprawling Desert">
<inherit name="westdirection" />
</exit>
</object>
<verb>
<property>hidebehind</property>
<pattern>hide behind</pattern>
<defaultexpression>"You can't hide behind " + object.article + "."</defaultexpression>
</verb>
<object name="hiding behind sand dune">
<inherit name="editor_room" />
<descprefix>You are</descprefix>
<description><![CDATA[<br/>You have hidden yourself behind the sand dune in the sprawling desert. You cannot go anywhere except back into the sprawling desert. You sense that there is someone walking around just on the other side of the sand dune. <br/><br/>To return to the sprawling desert, you'll need to 'unhide' or 'emerge'.]]></description>
<exit alias="out" to="hiding behind sand dune">
<inherit name="outdirection" />
<lookonly />
<look>You peek out from behind the sand dune and see a scary looking man. This is definitely the man who fired the rocket at you back in the Rover. You know this because you would never forget that face. His eyes are beady and weasel-like, and he has a big, hooked nose like a massive bird of prey. He is also carrying a rocket launcher. He is wearing a traditional desert robe. Just before you duck back behind the sand dune, you catch a glimpse of a red "D" emblazoned on his black robe.</look>
</exit>
<command name="emerge unhide">
<pattern>emerge; unhide</pattern>
<script>
MoveObject (player, Sprawling Desert)
</script>
</command>
</object>
<turnscript name="SDTS">
<script><![CDATA[
if (game.pov.turns = 2) {
msg ("<br/>The voice seems to be getting a bit louder...<br/>")
} else if (game.pov.turns = 4) {
msg ("<br/>The voice you've been hearing is clear and audible now, but it's in a foreign language and you can't make out what is being said.<br/>")
} else if (game.pov.turns = 6) {
msg ("<br/>The voice is so close, you are amazed you can't see the person issuing it. The voice sounds like one of the men that was at the top of the cliff just a while ago.<br/>")
} else if (game.pov.turns = 7) {
msg ("<br/>Bad Guy Number One emerges in the sprawling desert. He drops his phone he has been using and readies his rocket launcher. The last thing you remember is the tip of the fired rocket stricking you in the knee cap. It has turned you into vulture kibble. At least you went out with a bang!<br/>")
DecreaseHealth (100)
finish
}
on ready {
game.pov.turns = game.pov.turns + 1
}
</script>
</turnscript>
XanMag wrote:I should not have to set up a local counter separately, right?
This removes the entire thing (nothing will be displayed during game play):
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
</statusattributes>
or, for an example, if you only want to remove the "turns" attribute from displaying, but not, let's say the, "strength" Attirbute:
// don't remove this line below, as it's your beginning line for your "statusattirbute" tag, lol:
<statusattributes type="stringdictionary">
// don't remove these lines below, as you want the "strength" attribute to be displayed:
<item>
<key>strength</key>
<value></value>
</item>
// remove these lines (or attribute "statusattributes" items in the GUI~Editor) below:
<item>
<key>turns</key>
<value></value>
</item>
// but, not this line below, as it is the ending line for the "statusattirbutes" attribute tag, lol:
</statusattributes>