The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsI have a simple platformer at the moment and I am trying to trigger an event with an invisible rectangle. The hitTest works absolutely fine and it changes the variable I want it to change, but it is also supposed to gotoAndPlay an animation within the movieclip - but it is ignored because the arrow keys are telling the MC to play a different frame.
Is there anyway that I can get the MC to ignore keyboard input for the duration of around 40 frames within the MC? If not, is there another way around this problem?
Thanks in advance.
yeah there is a way. just make a variable called death, make its data type boolean, and set it false.
then in your code where you gotoAndPlay the person walking, put code like:
if(death == false){
gotoAndPlay("walk");
}
then, in the code where you hittest something like:
if(mc.hitTest(mc2)){
death = true;
gotoAndPlay("death");
}
}
Thankyou, it wasn't for a death animation, but I understood the idea and it's working now =]
At 8/13/09 05:30 PM, mkmetalhead wrote: Thankyou, it wasn't for a death animation, but I understood the idea and it's working now =]
alright, cool glad i could help.