How do i make an actors self color to change from transparent to black, and the other way around?

so i'm making a fading change scene type thing. What i want is i want a black actor to change from completely transparent to completely visible, and then after the scene changes i want it to go from completely visible to completely transparent again. How do i pull this off? Please try to explain this as simply as you can. i'm sort of a noob :P

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2013
    Each actor has an attribute called self.color.Alpha, which is a value from 0 to 1. 0 represents 0% opacity (aka fully transparent/invisible). 1 represents 100% opacity (aka not transparent).

    To change the opacity, use Change Attribute self.color.Alpha to [1] or [0] or [a number between 0 and 1 such as 0.5].

    To fade, use an Interpolate behavior with self.color.Alpha as the attribute and a number for the duration (e.g. 1 second). Interpolate self.color.Alpha to 1 (from 0) to show the black actor (fade out). Reverse it for fade in.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • AleksandrGamesAleksandrGames Member Posts: 54
    thank you so much!
Sign In or Register to comment.