Is there a possibility to make rooms be either shown in daylight or at night, without using two different rooms? The background animation doesn't help. Or is it possible to turn on/off the backgroundanimation (wherein is a darker room) and set the delay somehow to infinite?
If this was discussed earlier I'm sorry, but I found it nowhere..
There ought to be at least 5 threads about this. I think one pretty elaborate one was started by Da_Elf. Try searching the forums again.
Okay, thanks, this is the link:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=28923.0
But I have to go through that some more times. Didn't understand yet how to avoid using several rooms for the day/night-effect.
Simplest way to do this:
Use a global int to tell when it is night or day and use the command SetBackgroundFrame();.
For example:
Say you have Global int 5 controlling day and night.
0=day
1=night
Background frame 0=day
Background frame 1=night
In the Repeatedly execute of any rooms containing day and night put this:
if (GetGlobalInt(5)==0) SetBackgroundFrame(0); //Day time has come
if (GetGlobalInt(5)==1) SetBackgroundFrame(1); //Night time has come
Hope this helps you,
--Snake
It's better practice to put this into before fadein.
Matti: doing it using one room is explained in depth starting about halfway down in the thread.
Okay, thank you both, now I got it.
Khrismuc: You're right. I just ran over the page, so I shouldn't have written "I have to go through that some more times" but rather "I have to go through that in depth".
And special thanks to you for answering almost every question posted here..
Quote from: Snake on Mon 04/02/2008 16:16:23
Simplest way to do this:
Use a global int to tell when it is night or day and use the command SetBackgroundFrame();.
It would be better to create a global boolean instead. That would make the code a
lot more readable.
QuoteIt's better practice to put this into before fadein.
Yes, you're absolutely right, that's what I would have done too after thinking about it.
QuoteIt would be better to create a global boolean instead. That would make the code a lot more readable.
Heh, I'm sure it would be. My scripting is always messy ;)
--Snake