A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Help again please!

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    Help again please!

    Well theres a game called stickicide and when you touch an object you die in a neat animated way and you respawn how would i do this heres the game just in case you dont understand what im saying


    http://www.i-am-bored.com/bored_link.cfm?link_id=17442

    i just need to know how to make it to where my character touches a certain object and the character dies in an animation like the game please give me answers thank you.

  2. #2
    Flashin'
    Join Date
    Aug 2010
    Location
    Somewhere
    Posts
    9
    Here's what to do:
    You need to create a movieclip for the "walls", next to that create another movieclip for the "touch-and-die" pieces.
    on those pieces you add this code:
    Actionscript Code:
    onClipEvent(enterFrame){
    if (_root.character.hitTest(this)){
    _root.character.GotoAndPlay("dead");
    }
    }
    now in the characters movieclip you add a frame and call it "dead", from there you start animating the death.
    don't forget to add the "stop" function.

    good luck!

  3. #3
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    k

    thanks mate if i have future problems ill tell you

  4. #4
    Flashin'
    Join Date
    Aug 2010
    Location
    Somewhere
    Posts
    9
    No problem
    if you have any questions, feel free to msg me ^_^.
    All that shines, turns to rust.

  5. #5
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    um

    heres what i am doing i made an enemy named it wall then i added a point and made it a movieclip named death point and i copy pasted your code to its actions then on my characters movie clip i opened it and made a new frame named dead and 5 frames for the death animation and added stop(); at the first frame of death sequence and the end of the death sequence but in game i touch it nothing happens please tell me step by step on what i should do thank you

  6. #6
    Flashin'
    Join Date
    Aug 2010
    Location
    Somewhere
    Posts
    9
    make sure that the first frame of the death sequence is unreachable(unless the spikes you touch refer you to it)
    simply said: make the first frame on the char movieclip have stop(); and name the second frame "death" (don't give it a stop action).
    All that shines, turns to rust.

  7. #7
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    damn

    damn um is it okay with you if i recorded me making the thing so you can see what im doing? im using flash cs4 would that have anything to do with it

  8. #8
    Flashin'
    Join Date
    Aug 2010
    Location
    Somewhere
    Posts
    9
    Could be, i use Flash 8.
    i could make you a quick example .fla if you want.
    All that shines, turns to rust.

  9. #9
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    k

    yes please also srry for late reply i had a football game

  10. #10
    Junior Member
    Join Date
    Aug 2010
    Posts
    17
    I made a example.But, how can I send files to you?

  11. #11
    Junior Member
    Join Date
    Aug 2010
    Posts
    9

    uh

    mediafire upload it and give me link to download it cool part is tht no sign up is required to upload just upload fla file

  12. #12
    Junior Member
    Join Date
    Aug 2010
    Posts
    17
    sorry,my English is not good.I don't understand what you mean.
    this is my code on scene1 frame1:

    mc1_state = "normal";
    function onEnterFrame() {

    if (_root.mc2.hitTest(_root.mc1)) {
    mc1_state = "die";
    } else {
    _root.mc2._x += 2;
    }

    if (mc1_state == "normal") {
    _root.mc1.gotoAndStop(1);
    } else if (mc1_state == "die") {
    _root.mc1.gotoAndStop(2);
    }
    }

  13. #13
    Junior Member
    Join Date
    Aug 2010
    Posts
    17
    OK!this is the link!
    http://www.mediafire.com/?iba714j201i13q7
    any problem,tell me!

  14. #14
    Flashin'
    Join Date
    Aug 2010
    Location
    Somewhere
    Posts
    9
    That seems to be working, saves me the trouble ^_^
    All that shines, turns to rust.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center