So I'm working with imagemaps and stuff, and I have a system where you collect wood to build a house. I would like pieces of wood to stack up in accordance with how much actual wood you have in your inventory.
That said, I have the screen in an imagemap, but I do not want to have millions of pictures with each permutation of building level, wood amount, time of day, blah blah blah.
I have been trying to have the imagemap as a foundation of sorts, with a single log as the image, just repeating with a counter for each piece of wood.
In order to do this, I have been trying to set it where the screen with the imagemap contains a "While" statement as such:
Code: Select all
screen ext_screen:
imagemap:
ground "Exterior_[house_progress]_[daynight]_ground.jpg"
idle "Exterior_[house_progress]_[daynight]_idle.jpg"
hover "Exterior_[house_progress]_[daynight]_hover.jpg"
hotspot (970, 407, 614, 502) action Jump("house_label")
hotspot (8, 315, 817, 315) action Jump("forest_label")
hotspot (675, 905, 106, 98) action Jump("building")
$ wood_x = 505
$ wood_y = 886
while wood_counter <= wood:
if wood_counter == 7:
$ wood_y = 860
$ wood_x = 510
if wood_counter == 12:
$ wood_y = 834
$ wood_x = 515
show "log.png" at pos(wood_x, wood_y)
$ wood_counter -= 1
$ wood_x += 10
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 103: u'while' is not a keyword argument or valid child for the screen statement.
while wood_counter <= wood:
^
Ren'Py Version: Ren'Py 7.2.2.491
Thu Jun 24 17:57:48 2021
If anyone can offer some advice as to how to proceed, I would be grateful.
Or maybe I'm trying this all wrong...