I am creating an RPG called Questopolis. It's quite typical: monsters spawn at night, you can fight them, you earn experience, etc.
I need the monsters to spawn at night and to disappear at day. So I have created a variable called "light", to determine when the monsters need to appear.
The stage also needs to darken and lighten, so this is the script I have right now:
when I receive [started v] forever repeat (100) change [brightness v] effect by (-1) change [light v] by (-1) wait (4) secs end repeat (100) change [brightness v] effect by (1) change [light v] by (1) wait (2) secs end endThis script used to work just fine. But as my RPG expanded, I added an inn. When you slept in the inn, the light level would increase back to maximum. The script to do this looks something like this:
when I receive [sleep v] set [light v] to (100)However, this script can't change the stage's brightness. So when you finish sleeping, the sky is still dark.
Offline
You simply forgot to set the brightness back again. c: You can do a quick fix on that "sleep" script:
when I receive [sleep v] set [light v] to (100) set [brightness v] effect to (0) broadcast [started v] //I suggest you restart the day/night cycle, to avoid bugs.
Offline
technoguyx wrote:
You simply forgot to set the brightness back again. c: You can do a quick fix on that "sleep" script:
when I receive [sleep v] set [light v] to (100) set [brightness v] effect to (0) broadcast [started v] //I suggest you restart the day/night cycle, to avoid bugs.
Thanks. The problem with that is that almost ALL the sprites are commanded by the "started" message. I'll simply make a new one.
-5 min later-
Great! It works! Thanks!
Offline