Jump to content

Gothica Crazyboi

Resident
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Gothica Crazyboi

  1. I am trying to make a target system where I shoot it up to five times each time shows a new color, on the 5th time reset the counter and start fresh with it going back to white.

     

    this is what I have thus far but it's getting stuck on the 5th color and not working from there.


    default
    {
        state_entry()
    {
        }  
         collision_start(integer number_detected)
    {
        llSay(0, "Ding!");
        {
        integer i;
        for( i = 0; i < number_detected; i++ )
        {
            if(i=1)
            {
                llSetColor(<1,1,0.0>, ALL_SIDES);
            }
            if(i=2)
            {
                llSetColor(<0.0,0.0,0.0>, ALL_SIDES);
            }
            if(i=3)
            {
                llSetColor(<0.0,0.0,1>, ALL_SIDES);
            }
            if(i=4)
            {
                llSetColor(<0.0,1,0.0>, ALL_SIDES);
            }
            if(i=5)
            {
                llSetColor(<0.5,0.2,0.0>, ALL_SIDES);
            }
            if(i > 5)
            {
                llSetColor(<1,1,1>, ALL_SIDES);
                llResetScript();
            }
        }
        }
    }
        collision_end(integer number_detected)
        {
        }
    }

     

×
×
  • Create New...