Page 1 of 1

Biggest glitch ever

PostPosted: Wed Jul 08, 2009 6:16 pm
by Hblade
I know it's not the perfect hue cycle method but just find this out. Ok, heres the code for the void
Code: Select all
void HueCycle();
{
    tempcount = tempcount + 1;
    if (tempcount == 19)
    {
    r = r + rand(255);
    b = b + rand(255);
    g = g + rand(255);
    tempcount = 0;
    }
    if (r < 255)
    {
        r++;
    }
    if (b < 255)
    {
        b++;
    }
    if (g < 255)
    {
        g++;
    }
    if (r == 255)
    {
        r = 0;
    }
     if (b == 255)
     {
         b = 0;
     }
     if (g == 255)
     {
     g = 0;
     }
}

EDIT: (It still turns yellow when saying HueCycle)
That dosnt work for some reason, it says "Undeclaired Function: HueCycle();" but yet, when I jsut put this in the draw actor instead of the void, it works fine :/
Code: Select all
    tempcount = tempcount + 1;
    if (tempcount == 19)
    {
    r = r + rand(255);
    b = b + rand(255);
    g = g + rand(255);
    tempcount = 0;
    }
    if (r < 255)
    {
        r++;
    }
    if (b < 255)
    {
        b++;
    }
    if (g < 255)
    {
        g++;
    }
    if (r == 255)
    {
        r = 0;
    }
     if (b == 255)
     {
         b = 0;
     }
     if (g == 255)
     {
     g = 0;
     }

Any ideas?

Re: Biggest glitch ever

PostPosted: Wed Jul 08, 2009 6:29 pm
by Fuzzy
Code: Select all
void HueCycle();


is wrong. It should be
Code: Select all
void HueCycle()


take the semi-colon off.

Re: Biggest glitch ever

PostPosted: Wed Jul 08, 2009 6:34 pm
by Hblade
Wow, that was a typo I made

Re: Biggest glitch ever

PostPosted: Wed Jul 08, 2009 6:42 pm
by Fuzzy
Hblade wrote:Wow, that was a typo I made



Happens to everyone, all the time.