Hi everyone my name is Justin Lamoureux and i am new to actionscripting although i do know a little I dont know much… this is my problem I am trying to right a code that will help me make a random gotoAndPlay hits test script like you see the the popular game Pokemon. I have a character that is going over top of another movie clip but i want it to start generating random number and once it its a certain number i want it to go to the frame it is assigned to
this is what i have so far:
onClipEvent (enterFrame){
if(_root.guy_mc.hitTest(this)){
var randomNumber = Math.floor(Math.random()*4+1);
trace(randomNumber);
if(_root.random == 1(gotoAndPlay("battel1"))){
gotoAndPlay("battle1");
}
///-- I even wrote it two different ways to see if it would work but it doesnt ---------/////
if(_root.randomNumber == 3){
gotoAndPlay("battle2");
}
}
}
thanx for everyone who helps out