You can create a more graphical shop script and a more graphical directory by using the third parameter in "guibutton" and the second parameter in "guitext". It determines the icon, which is in front of your text. You can create 128x128 PNG images of the things your shop offers, and put it in a directory data/hud/xxx/icons/inventory. Then you can use these images like this:
Code: Select all
guitext ( format "You have %1 moneys in your wallet." $money ) "inventory/money.png"
or:
Code: Select all
guibutton "Pie: 10 moneys" [
if ( > $money 9 ) [
money = ( - $money 10 )
pie = ( + $pie 1 )
]
] "inventory/pie.png"
To determine xxx, which is the version of hud (which means heads up display, I think) you are using, try to use the modified script. If Sandbox doesn't find the images you specified, it gives an error message, which contains the full path to the icons directory.
You can also use these options to display the face of the character, who is talking to you:
Code: Select all
guitext "What're ya buyin, stranger?" "chars/shopkeeper.png"