giriş
|
dil
Български (Bulgarca)
čeština (Çekçe)
Dansk (Danca)
Nederlands (Felemenkçe)
English (İngilizce)
Suomi (Fince)
Français (Fransızca)
Deutsch (Almanca)
Ελληνικά (Yunanca)
Magyar (Macarca)
Italiano (İtalyanca)
日本語 (Japonca)
한국어 (Korece)
Norsk (Norveççe)
Polski (Lehçe)
Português (Portekizce)
Português-Brasil (Brezilya Portekizcesi)
Română (Rumence)
Русский (Rusça)
简体中文 (Basitleştirilmiş Çince)
Español (İspanyolca)
Svenska (İsveççe)
繁體中文 (Geleneksel Çince)
ไทย (Tayca)
Українська (Ukraynaca)
Steam'i çevirmemize yardım edin
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