More Info:
1) It runs, but bksv never shows up.
2) What I'm trying to learn how to do, is make a screen image where the player can choose a book to buy. What I really want is player to use their "wand" to choose a book on a shelf. The books don't exist yet, as I only have the bookshelf slots where a book would go. I was thinking of buttons which would be the books. My code doesn't even begin to do this. I wanted to capture where the cursor/image was on the mouse.
Thanks!
Code: Select all
# You can place the script of your game in this file.
# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
# Declare characters used by this game.
init:
define j = Character('Jyz', color="#0000ff")
image bksv = "bksv.png"
# The game starts here.
label start:
j "How to make a screen language menu..."
j "ROFL!"
j "This screen does nothing yet."
screen say:
window id "window":
vbox:
spacing 10
text who id "who"
text what id "what"
screen add_test:
add "bksv.png" xalign 1.0 yalign 0.0
screen hello_world:
tag example
zorder 1
modal False
text "Hello, to lacking tutorials, where lacking is king!"
Code: Select all
class storeItem:
self.select = select
self.deselect = deselect
self.pay = pay
self.items2inv = items2inv
class selectCapture:
def __init__(self, keycode, binding, cart):
self.binding = binding
self.keycode = keycode
self.cart = cart
def items(name, description, price):
self.name = name
self.description = description
self.price = price
class cash:
def__init__(self, £1000)
self.money = money
# This I have no clue on! b = buy book, but I don't know how to write this at all.
def selectItem(self, event):
if event.key=="b":
subtract $ from wallet