I am progging an "old-school-3D-RPG" and it went fine so long. Everything is shown in the right order, I added a day-night-cycle (it works perfect).
Now I try to "light" a candle or torch in the night. At the moment I only reduce the darkness, but a torch (or candle) should have a "lightcircle" around the party. I read many things about layer, but trying to add more layer gives the error:
Exception: Trying to add something to non-existent layer 'transient'.
What I did, was adding the line:
config.layers = [ 'master', 'mittelayer', 'nahlayer' 'transient', 'screens', 'overlay']
at the end of my options.rpy (I found this tipp in the internet). Well, it doesn't seem to work...
The following idea I had:
Code: Select all
screen world():
imagemap:
ground 'images/bg/interface.png'
hover ''
alpha False
add "bg/actionleiste 1.png" ypos 532
add "welt/himmel/himmel [showBG[0]] [numBG].png" xpos 136 ypos 136
add "welt/boden/boden [showBG[1]] [numBG].png" xpos 136 ypos 332
$ entfernung = 8
$ rechtsLinks = 0
$ temp1 = ""
if party[activeParty].stadt == "Wildnis":
$ KARTE = 2000
else:
$ KARTE = 50
if party[activeParty].blickrichtung == "norden":
if party[activeParty].position[0] + entfernung < KARTE and party[activeParty].position[1] + rechtsLinks < KARTE:
$ temp = worldData[PARTYisINarea][party[activeParty].position[0] + entfernung][party[activeParty].position[1] + rechtsLinks]
else:
$ temp = -1
elif party[activeParty].blickrichtung == "süden":
if party[activeParty].position[0] >= entfernung and party[activeParty].position[1] + rechtsLinks < KARTE:
$ temp = worldData[PARTYisINarea][party[activeParty].position[0] - entfernung][party[activeParty].position[1] + rechtsLinks]
else:
$ temp = -1
...
if temp in WAND:
add "wand/Gra[temp]88.png" xpos 460 ypos 326 #Wand mitte(8)
#and so on, until the range of the candle or torch is arrived.
# Then switch to the "mittelayer" and adding the next walls, obstacles or NPC but with less darkness
Maybe I shouldn't use
imagemap:
and instead "show" everything on the screen?
... Do you have any suggestions?
BTW: I use Renpy 7.3.5.606
THX in advance