Alright my code is
onClipEvent (load) {
saberswg1 = new Sound();
FastSabr = new Sound();
sabhit1 = new Sound();
sabrswg1.attachSound("swing1");
FastSabr.attachSound("swing2");
sabhit1.attachSound("hituno");
}
onClipEvent (enterFrame)
{
if (Key.isDown(Key.SPACE)) {
this.gotoAndStop(5);
FastSabr.start(0, 1);
_root.DarthVaderplayablemain.rapidswing;
if (hittest(_root.ObiWanCpu))
{
sabhit1.start(0, 1);
_root.ObiWanHealthScore = _root.ObiWanHealthScore + 10;
updateAfterEvent();
} // end if
} // end if
// Right key for Move right
if (Key.isDown(Key.RIGHT)) {
this.gotoAndStop(3);
this._x += 5;
// A key for move left
}
if (Key.isDown(Key.LEFT)) {
this.gotoAndStop(2);
this._x -= 5;
}
}
onClipEvent (keyUp) {
this.gotoAndStop(1);
}
No syntax errors or anything but when Vader hits Obi Wan,ten points aren’t added. I used a trace before to make sure hittest was working and it worked fine,I can’t see why the 10 points aren’t being added…AAAHNESS