Niste prijavljeni (Prijavi se)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

 
Dec 26th 2009 izmenjeno
 

Da li neko zna kako da programiram da kada "zivot" bude jednako 0 da pustim neki frejm?

 

onClipEvent (load) {n=-1;}

onClipEvent (enterFrame) {
    this._x+=n; count++;
    if (count==150) {count=0; n=-(n);this._xscale=-(this._xscale);}
    if (this.hitTest(_root.hero)) {_root.playGame=false;_root.hero.gotoAndStop(28);_root.zivot-=1;}
}

Verovatno se to radi sa if naredbom ali nisam siguran kako! Molim za pomo?!

 

Koristio sam AS2!

 
Dec 27th 2009
 

onClipEvent (enterFrame) {
this._x+=n; count++;
if (count==150) {count=0; n=-(n);this._xscale=-(this._xscale);}
if (this.hitTest(_root.hero)) {_root.playGame=false;_root.hero.gotoAndStop(28);_root.zivot-=1;}

if (_root.zivot == 0)  _root.gotoAndPlay(30); // ako je zivot nula pusti root frejm 30

}

 
Jan 11th 2010
 
HVALA!!