GameMaker: Studio

GameMaker: Studio

檢視統計資料:
Kensou 2013 年 2 月 11 日 下午 2:18
Room Transition Effects Help
Working on a set of opening screens for my project and am unfamiliar on how to add transition effects such as a fade to black for the next screen for example. Moving to the next room/screen is something I understand but would like it to be a smoother transition. Just looking for some some light to be shed to help out. Any help is appreciated! Thanks guys
< >
目前顯示第 1-5 則留言,共 5
M.S.T.O.P. 2013 年 2 月 11 日 下午 3:41 
If you were looking for built-in room transitions, the old ones from GM 8.1 were removed from Studio due to cross-platform incompatibilities. In any case, you'll need to code your own. For a fade in/out effect, I just draw a solid rectangle over the entire game window and increase/decrease the draw alpha as time passes (I just tie the draw alpha to alarm[] variables).
Kensou 2013 年 2 月 11 日 下午 4:07 
Thanks I'll give it a shot.
Kensou 2013 年 2 月 11 日 下午 9:12 
After long time messing with this I've gotten stumped. So if you have any kind of visual that can help that would be appreciated once again. Thx for your time friend
Esperento 2013 年 4 月 28 日 上午 2:03 
Make a big black rectangle, about the size of your screen resolution. Call it obj_fade_out.
In obj_fade_out's CREATE event put the following:
image_alpha = 0.05 //this is the start fade for going into the next room.

In obj_fade_out's STEP event put the following:
if (image_alpha is less than 1)//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.
{ image_alpha += 0.05 //smaller value here increases fade time.
}

if (image_alpha is greater than or equal to 1))//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.
{ instance_destroy()
}

In obj_fade_out's DESTROY event put the following:
{
room_goto(room_name) //or if you have a standard hierarchy of rooms, use room_goto_next()
}

Now when you want to fade out of a room just create this object in the centre like so:
instance_create(room_width/2, room_height/2, obj_fade_out)

Now on the room CREATE of the next room you'll have the following to fade in.
instance_create(room_width/2, room_height/2, obj_fade_in)

Now create an object called obj_fade_in, give it the same big black rectangle as a sprite.
Then do the following:
obj_fade_in's CREATE event:
image_alpha = 1 //make it nice and opaque

obj_fade_in's STEP event:
if (image_alpha is greater than 0))//note: can't use less than or greater than symbols in this description, just place the correct symbol in the place of the words.
{ image_alpha -= 0.05 //smaller value here increases fade in time.
}

if (image_alpha == 0)
{ instance_destroy()
}

That's pretty much it. You'll now have a basic fade in and out. Just remember to create an instance of obj_fade_out whenever you want to move to the next room, and an instance of obj_fade_in in the room CREATE of every room you want to fade in to.

This was via Slasher X's video description http://www.youtube.com/watch?v=9TmzNdGm2Q4 (ignore the video itself and read the video description if you're on Game Maker Studio) and it works a treat for me
Kensou 2013 年 5 月 1 日 上午 11:07 
Ohh, this looks like it might be even easier. Thank you for posting this my man! Appreciated~!
< >
目前顯示第 1-5 則留言,共 5
每頁顯示: 1530 50

張貼日期: 2013 年 2 月 11 日 下午 2:18
回覆: 5