At 10/26/09 08:57 PM, ChazzGoth wrote:
onClipEvent(enterFrame){
if(this.hitTest(_root.Player._root.wRunF )){
_root.Asarath._root.wRunF.gotoAndPlay(71 )();
}
}
What is wrong with this code?
It says it's working fine.
The idea is, if my player is on his running forward (wRunF) animation and he is hit by an enemy, his animation goes to frame 71, which is of him being hurt, does anyone have ANY idea how I can get this to work?
Ok I remember a similar script being posted earlier. LEARN!
if(this.hitTest(_root.Player._root.wRunF )){
Now first of all mc1.hitTest(mc2) you have to movie clips in the mc2 part: "_root.Player._root.wRunF" You should only have one. So:
if(this.hitTest(_root.wRunF )){
Is what I think your thinking.
And this:
_root.Asarath._root.wRunF.gotoAndPlay(71 )();
Again you have 2 movie clips there. If your trying to make Asrath go to frame 71 then you do this.
_root.Asarath.gotoAndStop(71);
If your trying to make wRunF go to 71 then:
_root.wRunF.gotoAndPlay(71)
Understand?