Page 1 of 1

simulating voyage GameMode.fadeOut

Posted: Sun Feb 22, 2015 5:28 pm
by bongobeat
Hey all,

please can someone help with this script? (to be sure nothing can goes wrong)
it is used to simulate a voyage. The screen get black, the player get blocked into a forcefield, and after a time he is teleported on an island.
SpoilerShow

Code: Select all

				GameMode.fadeOut(0,0,0,1,5)
--				GameMode.advanceTime(7200)

				playSound("discover_spell")
		                GameMode.fadeIn(0,0,0,1,1)
I use the fadeOut, but I don't really know if this is the correct way. I tried the rgb 0 0 0 1 to use black color. 5 is the time that the screen stay black.
Can someone tells more about how to use GameMode.fadeOut(0,0,0,1,5) ?
It suddenly goes black, can it be set to something more slow? Same thing for the GameMode.fadeIn, it suddenly remove the black screen.

How to advance time while the voyage? I tried GameMode.advanceTime(amount), with 7200 in value like 7200 seconds, but that don't do anything.
is it possible to see the screen effect, that the timepiece trigger when you rest?

Re: simulating voyage GameMode.fadeOut

Posted: Sun Feb 22, 2015 8:25 pm
by minmay
See the scripting reference. GameMode.fadeOut() takes two arguments, not five. Calling GameMode.fadeOut(0,0,0,1,5) should be the same as calling GameMode.fadeOut(0,0). The color is specified in a single R8G8B8 number, not 3 different arguments. So for example, GameMode.fadeOut(0x0,1) to fade to black over 1 second, or GameMode.fadeOut(0xffffff,2) to fade to white over 2 seconds.

Re: simulating voyage GameMode.fadeOut

Posted: Sun Feb 22, 2015 11:35 pm
by bongobeat
thanks for reply.
better fading now :D

what is the type of value that has to be used in the GameMode.advanceTime(amount) ?
is it seconds? minutes?

Re: simulating voyage GameMode.fadeOut

Posted: Mon Feb 23, 2015 12:19 am
by minmay
If I recall correctly, it's the same units used by GameMode.setTimeOfDay(). 0 is sunrise, 1 is dusk, when it reaches 2 it wraps around. Since 7200 is divisible by 2, it will have no effect whatsoever. 7200 seconds would be 7200/43200 of these units, exactly 1/6.

Re: simulating voyage GameMode.fadeOut

Posted: Mon Feb 23, 2015 12:34 am
by bongobeat
I have just test some lower values:

for 1 in value, the time advance by 12 hours
0.5 --> 6 hours
0.25 --> 3 hours