#### TechSkylander1518

##### Wiki Dweeb
Member
TechSkylander1518 submitted a new resource:

Cinematic Fade In/Out - A semi-fancy version of the usual fade in/out when transferring maps!

View attachment 4651
Okay I should have made a nicer map but I didn't want to go out of my way for a demo GIF

This is a script that shows the player character fading into a black screen when transitioning from one map to another!

Code
Ruby:
#Fade Speed is how fast the player sprite and screen fade out

#I know this is grossly inefficient, but I don't know a better way to do it atm
def prePlayer...

#### Leondrea

##### Trainer
Member
Shouldn't the player be invisible, when the screen turns black?
This way, it looks like the character is inside the black screen.
It looks weird to me, but idk if this is on purpose.
Maybe its just me, idk...

#### TechSkylander1518

##### Wiki Dweeb
Member
Shouldn't the player be invisible, when the screen turns black?
This way, it looks like the character is inside the black screen.
It looks weird to me, but idk if this is on purpose.
Maybe its just me, idk...
That's how it was requested, but it's easy to change like to work like that as well!

Delete the line
Ruby:
preplayer *= 2

Change this section

Ruby:
    loop do
if @sprite.opacity >= 255
break
else
dummyMove
@player.update
Graphics.update
end
end
10.times do
@player.update
end
loop do
if @player.opacity <= 0
break
else
dummyMove
Graphics.update
end
end

to

Ruby:
    loop do
if @sprite.opacity >= 255
break
else
dummyMove
@player.update
Graphics.update
end
end

And change this section

Ruby:
   loop do
if @player.opacity >= 255
break
else
@player.update
dummyMove
Graphics.update
end
end
loop do
if @sprite.opacity <= 0
break
else
dummyMove
@player.update
Graphics.update
end
end

to

Ruby:
   loop do
if @player.opacity >= 255
break
else
end