Cinematic Fade In/Out

Resource Cinematic Fade In/Out

TechSkylander1518

Wiki Dweeb
Member
Joined
Mar 24, 2017
Posts
785
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
FADE_SPEED = 15


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

Read more about this resource...
 

Leondrea

Trainer
Member
Joined
Jul 26, 2020
Posts
70
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
Joined
Mar 24, 2017
Posts
785
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
        @sprite.opacity += FADE_SPEED
        dummyMove
        @player.update
        Graphics.update
      end
    end
    10.times do
      @player.update
    end
    loop do
      if @player.opacity <= 0
        break
      else
        @player.opacity -= FADE_SPEED
        dummyMove
        Graphics.update
      end
    end

to

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

And change this section

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

to

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