Well, the problem you seem to have may be an int problem. What type of variable did you make? When you make it, you should select real if you didn't. That is not the only possible problem, as the code that you have won't work... The problem is that it only reduces if the transparency is above .9, and only increases if it is less than .1. So, it does not do anything in the middle. Another possible problem is your variable needs to fit not only the domain, but also the transp. This is one way to fix it, but I can't think of a better one right now... This just uses an int, so you would not need to change it to real. Hope this helps.
- Code: Select all
switch(fade)
{
case 0:
ChangeTransparency("Event Actor",transp+.01);
break;
case 1:
ChangeTransparency("Event Actor",transp-.01);
break;
}
if(transp=>.9 || transp<=.1)
{
fade=round(transp);
}