- Code: Select all
if(AvailableHologramTimer==125)
{
transp=.8;
}
if(AvailableHologramTimer==250)
{
transp=.7;
}
Is there some kind of formula that I can have so that the transparency goes down when the variable goes up.
if(AvailableHologramTimer==125)
{
transp=.8;
}
if(AvailableHologramTimer==250)
{
transp=.7;
}
happyjustbecause wrote:Is there some kind of formula that I can have so that the transparency goes down when the variable goes up.
transp = (1000.0-AvailableHologramTimer)/1000.0;
switch(AvailableHologramTimer)
{
case 0:
transp = (1000.0-AvailableHologramTimer)/1000.0;
break;
case 1:
transp=0;
break;
}
switch(AvailableHologramTimer)
{
case 0:
transp = 1;
break;
case 1:
transp=0;
break;
}
transp = AvailableHologramTimer==0;
transp = AvailableHologramTimer==0;
happyjustbecause wrote:Umm I don't really know what:
- Code: Select all
transp = AvailableHologramTimer==0;
means. But it seems the code I just added is working, the hologram's icon goes down in transparency as the power is getting closer for availability.
switch(AvailableHologramTimer)
{
case 0:
transp = (1000.0-AvailableHologramTimer)/1000.0;
break;
case 1:
transp=0;
break;
}
switch(AvailableHologram)
{
case 0:
transp = (1000.0-AvailableHologramTimer)/1000.0;
break;
case 1:
transp=0;
break;
}
Users browsing this forum: No registered users and 1 guest