Increasing and decreasing

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Increasing and decreasing

Postby Andrievskaya Veronika » Tue Jan 15, 08 12:07 pm

I want to increase DrawScale of something (in my case this is light ) and when drawScale reached some value, it starts decreasing to initial value :)

I'm trying, but this is not works. I.e. it works, but only for increasing :?

Code: Select all
function Timer()
{
 local Light L;

   Super.timer();

   ForEach AllActors(class'Light',L, 'SpecialLight')
      {
         L.DrawScale=L.DrawScale + 0.2;
            If (L.DrawScale >= 3.00)
               {
                  L.DrawScale=L.DrawScale - 0.2;
               }
      }
}


what is wrong? :oops: :oops:
User avatar
Andrievskaya Veronika
Poster
 
Posts: 164
Joined: Sat Sep 02, 06 7:35 am
Location: Database read error

Postby Alex » Tue Jan 15, 08 2:45 pm

Code: Select all
function Timer()
{
  local Light L;

  Super.Timer();

  ForEach AllActors(Class'Light', L, 'SpecialLight')
  {
    if(L != None)
    {
      L.DrawScale += 0.2;
      if(L.DrawScale >= 3.00)
        L.DrawScale -= 0.4;
    }
  }
}
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 1 guest