Fading

Game Editor comments and discussion.

Fading

Postby GuybrushThreepwood » Tue May 11, 2010 10:30 pm

Is there any way to make an actor slowly fade in without using differently shaded sprites?
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Fading

Postby Hblade » Tue May 11, 2010 10:32 pm

Yeah :)

First, go to create actor - Script Editor
Code: Select all
transp = 1;


Now go to Draw Actor - Script Editor
Code: Select all
transp-=.02;


Please check out my videos here :D
viewtopic.php?f=1&t=8219

they can really help you :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Fading

Postby GuybrushThreepwood » Tue May 11, 2010 10:55 pm

cool thanks :mrgreen:
Pirate: You fight like a diary farmer!
Guybrush: How appropriate, you fight like a cow!
User avatar
GuybrushThreepwood
 
Posts: 94
Joined: Sun Jul 06, 2008 12:23 pm
Location: Melee Island
Score: 2 Give a positive score

Re: Fading

Postby Hblade » Tue May 11, 2010 11:44 pm

Your welcome :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Fading

Postby linkshards » Wed May 12, 2010 4:38 pm

Oooo! What about fading transitions? Like the entire window/screen fades out and fades in black or white.
User avatar
linkshards
 
Posts: 45
Joined: Tue Apr 27, 2010 3:40 am
Location: Cibolo, Texas
Score: 1 Give a positive score

Re: Fading

Postby Hblade » Wed May 12, 2010 6:45 pm

Make an actor, a black actor the size of the screen or use canvas :D (Canvas tutorial in tutochao) use the erase function if canvas.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Fading

Postby linkshards » Sat May 15, 2010 4:01 am

How exactly would I get it to fade?
I'm thinking a transparency increment over a certain amount of time?
User avatar
linkshards
 
Posts: 45
Joined: Tue Apr 27, 2010 3:40 am
Location: Cibolo, Texas
Score: 1 Give a positive score

Re: Fading

Postby Hblade » Sat May 15, 2010 1:53 pm

Yeah, but if your using Canvas, it'd be allot easier if you just used a double or a (real) variable to determine the transparency of the "erase" value. Call it c_trans for canvas trans
Code: Select all
erase(0, 0, 0, c_trans);

Now, at Create Actor, have this code:
Code: Select all
c_trans = 1;

Then of course, put the erase code in Draw Actor. Now, when an event is called, (In draw actor, use a variable to make the switch)
Code: Select all
c_trans-=.02;

Now it'll slowly fade out to black.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Fading

Postby linkshards » Fri May 21, 2010 4:23 am

What about white?
User avatar
linkshards
 
Posts: 45
Joined: Tue Apr 27, 2010 3:40 am
Location: Cibolo, Texas
Score: 1 Give a positive score

Re: Fading

Postby MrJolteon » Fri May 21, 2010 6:44 pm

change the 0s in the erase code with 255
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Fading

Postby linkshards » Fri May 21, 2010 7:42 pm

Oh! Alright! lol I can't believe I didn't notice that it was an RGB scale. =w=
User avatar
linkshards
 
Posts: 45
Joined: Tue Apr 27, 2010 3:40 am
Location: Cibolo, Texas
Score: 1 Give a positive score

Re: Fading

Postby Hblade » Fri May 21, 2010 7:45 pm

lol
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest