Does anyone know how to load a picture using HTML code directly from a computer?
Apparently all you need to do is write this into script before entering a room:
<img src='gravestone.png' />
But that doesn't work. All I get is an error:
Failed to load game.
The following errors occurred:
Error: Error adding script attribute 'beforeenter' to element 'Graveyard': Invalid variable name ''
I tried also:
msg ("<img src='gravestone.png' />")
But then I get this:
Any ideas? Been busting my head on this for hours now.
And no, I don't want to use the picture command. I have a specific reason why I need to use HTML. Namely, I want to use the script from this old post:
But in order to load the picture from my computer, I need to use the HTML command. I don't want to use URL links.
The "msg" version is correct. But it has to be the web address of an image, not just the filename.
If the image is included in your Quest game, you use the function GetFileURL to do that. So it would be:
msg ("<img src=\""+GetFileURL("gravestone.png")+"\" />")
Thanks! That worked! Jesus Christ... took me hours to fix it. Now, just one more question. How do you put the picture as shown in the old link above, but so that the order is picture, followed by status, followed by compass and lastly ny inventory?
I found this line:
and I changed it to:
But then the picture disappears...
There isn't a
#statusLabel. I think you probably mean either
The default items in the sidebar are:
("Accordion" is the object that can be shown and hidden by the player clicking on the matching "Label")