Where has my object gone ?

Davidmarks
Another question which probabkly has simple answer. I have created and object (credit) in my first room , when I take it appears in the inventory. When I move to another room it vanishes and when i move back to first room it is no longer there ! WHY!

The Pixie
So when you play the game, the object is in the room, and appear in that list. The player types TAKE CREDIT, and gets a response, "Taken.", and the object then appears in the inventory list. Then when you go to a different room it vanishes from the inventory list?

Davidmarks
Tha's about it.. Rather than type take I am selecting take from the pop up and then recieve the taken message I have entered and the object appears in the inventory pane. As soon as I move to another room it disappears . However, as part of the learning process I have started another game and it works OK with object. The problem now is that I cant get the wretched map to show. This program is going to drive me nuts !

HegemonKhan
when you created the new game, you probably forgot to toggle on the map~grid display feature (with each quest version more features~options were added, as Tabs, to the GUI~Editor, cluttering it up, and so toggle options were added, to hide~reveal all of those features, aka Tabs, so not to clutter up the GUI~Editor). So, just open up your new game back into the GUI~Editor, and toggle the map~grid option on.

http://docs.textadventures.co.uk/quest/ ... notes.html

-----------

as for your object problem, if it's working fine in your new game, but not your old game, then likely you changed something (take or whatever) in your old game, as many people like to move Objects into a hidden (from the person playing the game) "storage" room, so *maybe* that is what you did or is happening?

--------

if you post your old game's code (to get into your game's code, just open up your 'blah.aslx' game file with any text software: notepad, wordpad, notepad++, Apple: text editor, etc), we can find and fix the object issue for you.

Davidmarks
I was looking to see the object appear in the usual position in the text, however it clearly only appears in the inventory panel. In fact at one location (Shopping area) it moves from the inventory panel to the objects and rooms panel. Regarding the lack of map, I have tried switching the toggle and it still doesnt work. Being new here I am reluctant to clog up the forum with all of the code (4 pages) and I don't understand it sufficiently to identify which bit has the problem. Incidentally , is there any way of causing the object to appear in the text as a hyperlink along with any other objects in each room ? Thanks for your patience

HegemonKhan
hmm... we really are going to need to see your entire game code (as to fix your problems, we need to see your entire game code, as unfortunately code is very interconnected: one error, might require fixing up a bunch of different and scattered parts across the entire game code), for us to be able to find and fix all of your issues for you (and also explain them too for you).

Four Pages isn't that much ;)
so don't worry about this

------------

if you rather keep your game code private, then you can pm~email it to one of the staff mods (I'm too busy to do it myself due to school classes, not a good time for me, otherwise, I'd try to help you with your code myself).

---------

to get to your entire game code:

(assuming you got a pc, and if you got an apple~mac, you should know how to do it ~ I think you got the "text editor" in your utilities folder ~ open up the game file with the "text editor")

right click on your game file (xxx.aslx) and open it with notepad (or wordpad, or notepad++, or whatever text software), highlight all of it (this is your entire game code), copy it, and then post it here, but see below on how to post it here:

--------------

in your post, type this in (and paste your code as I say below):

[code.]paste_your_code_here[/code.]

but without the dots in the brackets, which produces this:

paste_your_code_here


for example, here's a new game's default code:

<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="blah">
<gameid>blah</gameid>
<version>1.0</version>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>


------------------------

the reason to put (paste) your game code into the site's 'code' tags (the code boxes that you see above), is so that it doesn't make a massive text wall post, and the code's formatting (indenting and etc) is maintained, which is helpful for us in reading your code, and thus fixing your code up.

jaynabonne
You can also just attach it as a file in a reply!

Davidmarks
Hi, Here (hopefully) is the code. Newer version of code doesn't have the same problem but still does not show map. I'm very grateful for your help but please don't allow your studies to suffer on my account !! (Something I keep saying to my grand daughter who is learning Javascript)

<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="Wolverton Adventure">
<inherit name="theme_novella" />
<gameid>f43b479e-c928-4a9d-af59-63bca6ece9f5</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<autodescription_youarein_useprefix />
<gridmap type="boolean">false</gridmap>
<feature_pictureframe />
<feature_asktell />
<showdescriptiononenter />
<autodescription />
<echohyperlinks type="boolean">false</echohyperlinks>
<backgroundimage type="string"></backgroundimage>
<appendobjectdescription />
<setbackgroundopacity />
<backgroundopacity type="double">0.5</backgroundopacity>
<defaultbackground>Wheat</defaultbackground>
<customwidth type="int">990</customwidth>
<showlocation />
<showborder type="boolean">false</showborder>
<showpanes />
<custompaddingbottom type="int">108</custompaddingbottom>
<autodescription_youarein_newline />
<setcustomwidth />
<attr name="autodescription_youcansee" type="int">4</attr>
<attr name="autodescription_youcango" type="int">2</attr>
<attr name="autodescription_description" type="int">3</attr>
<defaultforeground>Black</defaultforeground>
<defaultlinkforeground>Red</defaultlinkforeground>
<autodescription_description_newline />
<setcustompadding />
<custompaddingtop type="int">70</custompaddingtop>
<showcommandbar type="boolean">false</showcommandbar>
<autodescription_youcansee_newline />
<autodescription_youcango_newline />
<command_newline />
<showhealth />
<showscore />
<start type="script">
ClearFramePicture
</start>
</game>
<object name="the square">
<inherit name="editor_room" />
<alias>Wolverton Square</alias>
<objectslistprefix>You are in possession of</objectslistprefix>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>You are standing in</prefix>
<suffix>There are a number of shops here and exit roads at each corner </suffix>
<exitslistprefix>You can go</exitslistprefix>
<picture>P1010464f.jpg</picture>
<descprefix type="string"></descprefix>
<description type="string"></description>
<enter type="script">
ClearFramePicture
SetFramePicture ("P1010472d.jpg")
</enter>
<beforeenter type="script">
ClearScreen
ClearScreen
ClearScreen
</beforeenter>
<onexit type="script">
HidePreviousTurnOutput
</onexit>
<exit alias="south west" to="sqsw" />
<exit alias="north east" to="sqne" />
<exit to="shopping area">
<prefix>perhaps just visit the </prefix>
</exit>
<exit alias="Pop into the Agora (good luck !)" to="agora" />
<exit to="sqnw" />
<object name="credit">
<inherit name="editor_object" />
<alias>Credit Card</alias>
<inroomdescription>tesco credit card</inroomdescription>
<take />
<takemsg>You now have a credit card !</takemsg>
<listalias>Tesco credit card</listalias>
<value type="int">10</value>
<feature_usegive />
<use type="boolean">false</use>
<ontake type="script">
AddToInventory (credit)
</ontake>
<look type="script">
msg ("You have" + credit.value+ "on your card")
</look>
</object>
<object name="player">
<inherit name="editor_object" />
<alias>DFM</alias>
<feature_player />
<turns type="int">10</turns>
<inroomdescription>turns = !</inroomdescription>
<health type="int">10</health>
</object>
</object>
<object name="Age UK shop">
<inherit name="editor_room" />
<alias>Age UK shop</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>you are now inside the</prefix>
<objectslistprefix type="string"></objectslistprefix>
<object name="An old Gramophone">
<inherit name="editor_object" />
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>In the corner, covered in dust you see</prefix>
</object>
</object>
<object name="The black sheep collective">
<inherit name="editor_room" />
<alias>Black Sheep collective</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
</object>
<object name="A Polish Grocery shop">
<inherit name="editor_room" />
<alias>A Polish Grocery Shop</alias>
<object name="lady">
<inherit name="editor_object" />
<inherit name="editor_player" />
<alias>A Polish lady behind the counter</alias>
<speak>She is waiting for you to respond to her question (perhaps you need to learn a little Polish !)</speak>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>you see</prefix>
<suffix>who says " co bys chcial "</suffix>
<feature_player />
<usestandardverblist type="boolean">false</usestandardverblist>
<displayverbs type="stringlist">
<value>Look at</value>
<value>Take</value>
<value>say</value>
</displayverbs>
</object>
</object>
<object name="A newsagents">
<inherit name="editor_room" />
<alias>a newsagents</alias>
<picture>P1010471.JPG</picture>
<enter type="script">
SetFramePicture ("P1010471.JPG")
picture ("")
</enter>
<object name="citizen">
<inherit name="editor_object" />
<alias>a copy of this week's citizen</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix type="string"></prefix>
<read>There is an article which tells of an interesting find ....</read>
</object>
<object name="mag">
<inherit name="editor_object" />
<alias>A copy of Penthouse</alias>
<read>You filthy swine., That just cost you ten points (not to mention the opticians bill !)</read>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>also</prefix>
</object>
<exit to="shopping area" />
</object>
<object name="sqsw">
<inherit name="editor_room" />
<alias>south west corner of the square (Aylesbury Street west ) This was originalyl the old Co op building</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>You are standing at the</prefix>
<exitslistprefix>You can go to</exitslistprefix>
<descprefix type="string"></descprefix>
<objectslistprefix type="string"></objectslistprefix>
<picture>P1010467.JPG</picture>
<exit to="the square" />
</object>
<object name="sqne">
<inherit name="editor_room" />
<alias>north easter corner of the square near the Agora entrance</alias>
<picture type="string"></picture>
<enter type="script">
SetFramePicture ("")
picture ("P1010467.JPG")
</enter>
<exit to="the square" />
</object>
<object name="shopping area">
<inherit name="editor_room" />
<exitslistprefix>You can visit</exitslistprefix>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<prefix>You are currently standing in a</prefix>
<picture>P1010465.JPG</picture>
<description>This is Wolverton square as it is now (in 2015)</description>
<suffix>You could try visiting some of the shops</suffix>
<descprefix type="string"></descprefix>
<enter type="script">
MoveObjectHere (credit)
</enter>
<exit to="A newsagents" />
<exit to="Age UK shop" />
<exit to="The black sheep collective" />
<exit to="A Polish Grocery shop" />
<exit to="the square" />
</object>
<object name="agora">
<inherit name="editor_room" />
<alias>You are now inside the Agora - a good place to do some economy shopping !</alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<exit to="the square" />
<exit alias="Church Street Ratcliff Street junction " to="chur_rat" />
</object>
<object name="sqnw">
<inherit name="editor_room" />
<alias>north west</alias>
<enter type="script">
SetFramePicture ("P1010464.JPG")
</enter>
<exit to="the square" />
</object>
<object name="chur_rat">
<inherit name="editor_room" />
<alias>Church StreetRatcliffe Street junction </alias>
<usedefaultprefix type="boolean">false</usedefaultprefix>
<descprefix>You are in</descprefix>
<suffix>(outside the Agora)</suffix>
<description>Standing outside the Agora looking down...</description>
<enter type="script">
SetFramePicture ("border1b.jpg")
</enter>
<exit to="agora" />
</object>
<turnscript />
</asl

Davidmarks
Thought it might be helpful to share with all you helpful folk out there the type of game I am trying to write so that you can see how it relates to my problems and because some of you might like to do something similar yourselves.
The intention is to allow the players ( mainly local people) to take a lighthearted wander through the streets of their town (in this case Wolverton in Buckinghamshire) to see photos as it is now, to solve puzzles, answer (mainly historical) questions and then if they find the magic potion/ time machine, to travel back and see how it used to look, together with historical information (by creating new exits leading to the historical bit etc.) This last thing is why I would like to be able to add the new exit as a clickable hyperlink in the text. Meanwhile thanks for your interest/help … the old grey cells are deteriorating more than a bit !

HegemonKhan
excellent, your post is exactly what we want, you successfully posted your game code and inside of the site's-post's 'code' box too!
(though you got an extra empty code box, which isn't needed, but meh, 99% perfect is statistically-mathematically, perfect, laughs)

----------

joking around (being silly)...

time travel... so you're going to make an epic H.G. Wells 'Time Machine' similar type of quest game, awesome! :D

hmm.. this means your wife is fated to die, no matter how many times you try to time travel and save her, but you'll find her genetic reincarnation far into the future (but a backwards future, a primitive world)...

The Pixie
I think the problem is that the room called "the square" has an object list prefix that is "You are in possession of". the credit card is in that room, so the player sees "You are in possession of a credit card" when in fact he is not, it is in the room. You go to another room, and the credit card is not there. Return, and there it is, so again you get that message "You are in possession of a credit card". If you actually take the credit card, it behaves as it should.

If you want the player to start with a credit card, move it to the player object.

What is the deal with your exits? Are you wanting to use the compass rose?

Davidmarks
Hi,
Thanks for that. The exit problem is this: I wish to use hyperlinks in the text to allow the player to select their next destination rather than have them look at a list in the side panel. So when I use a script to create a new exit I would prefer that new exit to appear as an additional hyperlink in that room's description.

The Pixie
In that case you might want to put this in your start script ("Script" tab of the game object) to hide the compass.
JS.eval ("$('#compassLabel').css('display', 'none')")
JS.eval ("$('#compassAccordion').css('display', 'none')")

Davidmarks
Brilliant ! You're a genius ... Now I can create my secret door into the past excellent !

Davidmarks
Main problem now is that I still have no map. It is toggled on in the game object but does not appear. I have created a new game with just a couple of rooms and it doesn't seem to work there either. This is the code for the two room test game which shoul have the mapoption switched on.

<!--Saved by Quest 5.5.5328.26617-->
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="testgame">
<gameid>17d2c58e-a7ce-45bf-a407-02046b448955</gameid>
<version>1.0</version>
<firstpublished>2015</firstpublished>
<gridmap />
</game>
<object name="room">
<inherit name="editor_room" />
<description>no of turns = "!"</description>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<turns type="int">10</turns>
<statusattributes type="stringdictionary">
<item>
<key>turns</key>
<value></value>
</item>
<item>
<key>health</key>
<value></value>
</item>
</statusattributes>
<health type="int">10</health>
</object>
<exit to="room2" />
</object>
<object name="room2">
<inherit name="editor_room" />
<enter type="script">
DecreaseObjectCounter (room2, "health")
EnableTurnScript (credit)
</enter>
<exit to="room" />
</object>
</asl>

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

Support

Forums