Code: Select all
label lbl_burger_plate:
$ on_plate.append(Ingredient.beefpatty.id)
$ Ingredient.beefpatty.stock -= 1
$ stacklayer.append("beefpatty")
$ stacklayer_count += 1
call lbl_check_plate
call screen scr_drag_and_drop
layeredimage burgerstack:
always:
"/images/ingredients/ing_bottombun.png" xalign 0.5 ypos 550
if stacklayer_count >= 1:
"/images/ingredients/ing_[stacklayer[1]].png" xalign 0.5 ypos 500
if stacklayer_count >= 2:
"/images/ingredients/ing_[stacklayer[2]].png" xalign 0.5 ypos 450
if stacklayer_count >= 3:
"/images/ingredients/ing_[stacklayer[3]].png" xalign 0.5 ypos 400
if stacklayer_count >= 4:
"/images/ingredients/ing_[stacklayer[4]].png" xalign 0.5 ypos 350
if stacklayer_count >= 5:
"/images/ingredients/ing_[stacklayer[5]].png" xalign 0.5 ypos 300
if stacklayer_count >= 6:
"/images/ingredients/ing_[stacklayer[6]].png" xalign 0.5 ypos 250
if stacklayer_count >= 7:
"/images/ingredients/ing_[stacklayer[7]].png" xalign 0.5 ypos 200
if stacklayer_count >= 8:
"/images/ingredients/ing_[stacklayer[8]].png" xalign 0.5 ypos 150
if stacklayer_count >= 9:
"/images/ingredients/ing_[stacklayer[9]].png" xalign 0.5 ypos 100
if stacklayer_count >= 10:
"/images/ingredients/ing_[stacklayer[10]].png" xalign 0.5 ypos 50
Code: Select all
if stacklayer_count >= 1:
"/images/ingredients/ing_[stacklayer[1]].png" xalign 0.5 ypos stacklayer_ypos[1]
but it won't let me use that? It only accepts variables, so then I tried putting stacklayer_ypos[1] into a variable and doing
Code: Select all
ypos stacklayer_ypos1
I want it that ways because there may be instances where the player will add sauce and the sauce image won't nearly needed as much ypos distance as the solid fillings, and they would be able to add sauce on any layer. So I need the burger to look coherent for that instance. I want to be able to tell each layer how far up to go based on what the filling below it is.
Any help would be great, I've been scratching my head at this forever and what I have above is the best I can do.