home *** CD-ROM | disk | FTP | other *** search
- xs = r.carspeed;
- totalcartype = 7;
- if(tipe != 1)
- {
- tipe = 2 + random(totalcartype - 1);
- }
- hei = 30;
- wid = r.carwid[tipe];
- xmin = _X;
- xmax = _X + wid;
- ymin = _Y - hei;
- ymax = _Y;
- onenterframe = function()
- {
- _X = _X + xs;
- cekswapdep();
- if(tipe == 1)
- {
- if(!r.jump and !r.inv)
- {
- if(cekhitr())
- {
- if(s._x < this._x + 30)
- {
- r.jump = 1;
- }
- else
- {
- r.hit = 18;
- r.ydiv = r.oldy - s._y;
- if(r.ydiv > 0)
- {
- r.hitpos = _Y + 2;
- }
- else
- {
- r.hitpos = _Y - hei;
- }
- }
- }
- }
- }
- else if(cekhitr())
- {
- r.hit = 18;
- r.ydiv = r.oldy - s._y;
- if(r.ydiv > 0)
- {
- r.hitpos = _Y + 2;
- }
- else
- {
- r.hitpos = _Y - hei;
- }
- }
- cekbulletcar();
- if(_X < - _width)
- {
- r.cars.removevalue(_name);
- this.removeMovieClip();
- }
- };
-