This is my code:
onClipEvent(enterFrame){
if(_root.char.hat.hitTest(this)){
_root.gotoAndStop(6);
_root.char._y +=50;
_root.grav = 20;
}
}
How to make the hitTest trigger new scene ?
This is my code:
onClipEvent(enterFrame){
if(_root.char.hat.hitTest(this)){
_root.gotoAndStop(6);
_root.char._y +=50;
_root.grav = 20;
}
}
How to make the hitTest trigger new scene ?
To go to another
scene
, you can usegotoAndPlay()
orgotoAndStop()
:So your code can be like this, for example :
Hope that can help.