transparency

Non-platform specific questions.

transparency

Postby iamacooldude » Wed Nov 15, 2006 11:59 pm

I am trying to make the view fade in and out so that the MoveTo command seems less jerky. I tried this code:
Code: Select all
int endw=1;
    while(endw==1){
    view.transp-=.01;
    if(view.transp==0){
                endw=2;
                }
       }

But it just freezes game editor in an endless loop.(endw never equals 2)
Any ideas on how to fix this?
iamacooldude
 
Posts: 5
Joined: Thu May 04, 2006 1:16 am
Score: 0 Give a positive score

Postby Game A Gogo » Thu Nov 16, 2006 12:13 am

you cant change the view transparency, you need to create an actor, make it the color you need, then just infinite it and change the transparent
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby iamacooldude » Thu Nov 16, 2006 12:45 am

thanks! I'll try that.
It would be nice if you could do that, though.(and be able to specify a fade color)
iamacooldude
 
Posts: 5
Joined: Thu May 04, 2006 1:16 am
Score: 0 Give a positive score

Postby iamacooldude » Mon Nov 20, 2006 3:25 am

Actually, I did something similar...
I made a "black" actor the had the view as its parent and then changed it's transparency when I needed it. The actor was the size of the view. Works the same, but slightly different. Just wanted to let you know. :D
iamacooldude
 
Posts: 5
Joined: Thu May 04, 2006 1:16 am
Score: 0 Give a positive score

Postby Game A Gogo » Tue Nov 21, 2006 12:45 am

works differently, but is less memory usebled
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest