home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / 5Miles2Go.swf / scripts / DefineSprite_231 / frame_72 / DoAction.as
Encoding:
Text File  |  2001-07-07  |  1.3 KB  |  43 lines

  1. PassLeft = "1";
  2. PassRight = "0";
  3. PassUpCount = "0";
  4. PassDownCount += "1";
  5. CountCars = "1";
  6. while("5" >= CountCars)
  7. {
  8.    CarNum = "/car" add CountCars;
  9.    if((getProperty(CarNum, _X) + getProperty(CarNum, _width) / "2" < _X - _width / "2" - "2" or _X + _width / "2" + "2" < getProperty(CarNum, _X) - getProperty(CarNum, _width) / "2" or _Y + _height / "2" + "6" < getProperty(CarNum, _Y) - getProperty(CarNum, _height) / "2" or getProperty(CarNum, _Y) + getProperty(CarNum, _height) / "2" < _Y) and "390" >= _Y + "2")
  10.    {
  11.       set("Free" add CountCars,"1");
  12.    }
  13.    else
  14.    {
  15.       set("Free" add CountCars,"0");
  16.    }
  17.    CountCars += "1";
  18. }
  19. set("Free" add _name.substr("4","2"),"1");
  20. if(Free1 == "1" and Free2 == "1" and Free3 == "1" and Free4 == "1" and Free5 == "1")
  21. {
  22.    _Y = _Y + "2";
  23. }
  24. else
  25. {
  26.    Passing = "0";
  27.    PassDownCount = "0";
  28.    PassUpCount = "0";
  29.    PassLeft = "0";
  30.    PassRight = "0";
  31. }
  32. if(FrontLink eq "0")
  33. {
  34.    if(_Y + _height / "2" + "10" < getProperty(FrontLink1, _Y) - getProperty(FrontLink1, _height) / "2" or getProperty(FrontLink1, _Y) + getProperty(FrontLink1, _height) / "2" < _Y - _height / "2" - "10")
  35.    {
  36.       Passing = "0";
  37.       PassDownCount = "0";
  38.       PassUpCount = "0";
  39.       PassLeft = "0";
  40.       PassRight = "0";
  41.    }
  42. }
  43.