Fade

From Game Editor

Jump to: navigation, search

Create an Actor Variable, integer, named fade; Create an Actor Variable, real, named amount;


Actor>DrawActor>

transp+=fade;       //add the fade
if(transp<0.01){    //if object is opaque
 fade=.03;          //start making it transp
}
else if(transp>0.99){//if object is transparent
 fade=-.03;          //start making it opaque.
}

This can be applied to musicvol as well, or even movement. It will continuously fade in and out.

Retrieved from "http://game-editor.com/Fade"