change _mc (anim)state when grabbing ledge

3 posts

Flag Post

change _mc (anim)state when grabbing ledge.

in my game the _mc runs on land and jumps up to grab: ledge 1,2,3 etc

when jump.mc hits ledge 1, I want the jump.mc to gotoAndPlay(pullup.mc)

(anim of .char pulling himself up onto ledge1)

can anyone please help with the coding of these jumps?……..thankyou in advance!

 
Flag Post
// on jump.mc’s code.
onClipEvent (enterFrame) {
if (ledge.mc.hitTest(x,y,true) {
gotoAndPlay(frame where the pullupanimation starts);
} else {
gotoAndPlay(frame of the normal animation);
}

Also, this goes on the programming forum.

Edit the code before the x and y. The forum automatically edits the text and won’t show it correctly.

 
Flag Post

hello senekis93,

thanks very much I shall try this!