D
Dioramos
Guest
When i trigger warp object, I instantly move to the next room. How to make "Fade in" effect before teleporting? And "fade out" effect in next room.
What I do is I create the "fade out" object when I touch the warp object....and the "fade in" object is created in the next rooms creation code. So when I touch a warp object, the room I'm in turns back and then when it fades out I'm in the next room.When i trigger warp object, I instantly move to the next room. How to make "Fade in" effect before teleporting? And "fade out" effect in next room.
alpha =1;
alpha -= 0.05 //increase alpha
if alpha<0 {
instance_destroy(); //destroy when done
}
draw_set_alpha(alpha)
draw_set_color(c_black)
draw_rectangle(0,0,room_width,room_height,false)
draw_set_alpha(1)
alpha =0;
alpha += 0.05 //increase alpha
if alpha>1 {
alpha = 1
draw_set_alpha(alpha)
draw_set_color(c_black)
draw_rectangle(0,0,room_width,room_height,false)
draw_set_alpha(1)
I made "fade out" when touch the warp object, but i cant make working fade in...here are the codes I am using for obj_fade_in
Create event
Code:alpha =1;
Step event
Draw eventCode:alpha -= 0.05 //increase alpha if alpha<0 { instance_destroy(); //destroy when done }
---------------------------------------------------------------------------------------Code:draw_set_alpha(alpha) draw_set_color(c_black) draw_rectangle(0,0,room_width,room_height,false) draw_set_alpha(1)
here are the codes I am using for obj_fade_out
Create event
Step eventCode:alpha =0;
Draw eventCode:alpha += 0.05 //increase alpha if alpha>1 { alpha = 1
Code:draw_set_alpha(alpha) draw_set_color(c_black) draw_rectangle(0,0,room_width,room_height,false) draw_set_alpha(1)
I dont know how to see room creation code (im very newbie)youre supposed to create obj_fade in in the next rooms creation code.
I use "instance_create(0,0, obj_fade_in)"
Thanksgo to room editor. and you will see "creation code"
View attachment 25343
just click on that button and paste the code!