Fade

From Game Editor

Revision as of 05:31, 12 October 2009 by Dst (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
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"