this is code for char:onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
this._x -= 15;
this.gotoAndStop("left");
}else if(Key.isDown(Key.RIGHT)){
this._x += 15;
this.gotoAndStop("right");
}else if(Key.isDown(Key.DOWN)){
this._y += 15;
this.gotoAndStop("down");
}else if(Key.isDown(Key.UP)){
this._y -= 15;
this.gotoAndStop("up");
}
}
var for health is:health
var for score is:score
code for frame is: _root.score = (what score you whant it)
_root.health =(what health you whant it)
to hurt him do a dot and put this code on that:onClipEvent (enterFrame) {
if (this.hitTest(_root.char)) {
_root.health--;
unloadMovie (this);
}
}
:)
its working
jaydeecarmelo97 1 year ago
this doesnt work!!!
RStubbsProductions 1 year ago
booo
Loopvishal 2 years ago