Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 7 of 7
  1. #1
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Once again i need help ._.

    I am making a platformer, but i got a smaall problem. How do you make something dissapear when the hero hit it?
    Sway bought me VIP a few years back. Respect.

  2. #2
    Veteran Enthusiast
    Join Date
    May 2006
    Location
    Midlands, UK
    Posts
    5,638

    Re: Once again i need help ._.

    onClipEvent (enterFrame) {
    if (_root.CHARACTER-NAME.hitTest(_root.this)) {
    _root.unload.movie.this(); }
    }


    Seeing as I typed that out from memory, Im not entirely sure about the stuff in italics, but apply that code to the MC you want to dissapear and see if it works?

  3. #3
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: Once again i need help ._.

    Sorry, but it didn't work. I use flash 8 by the way
    Sway bought me VIP a few years back. Respect.

  4. #4
    Veteran Enthusiast
    Join Date
    May 2006
    Location
    Midlands, UK
    Posts
    5,638

    Re: Once again i need help ._.

    AS2?

    When I get back I'll just c/p the code from one of my platformers, I know what I've done wrong, I put some full stops where they shouldn't be and I think it needs some brackets lol.

  5. #5
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: Once again i need help ._.

    Yes, AS2. So you are going to C/p a code when you get back to your files? I'll be waiting then...
    Sway bought me VIP a few years back. Respect.

  6. #6
    Veteran Enthusiast
    Join Date
    May 2006
    Location
    Midlands, UK
    Posts
    5,638

    Re: Once again i need help ._.

    Got it
    onClipEvent (enterFrame) {
    if (this.hitTest(_root.Character-Name)) {
    unloadMovie(this);
    }
    }

    Should work a treat.

  7. #7
    Enthusiast Fyrren's Avatar

    Join Date
    Oct 2007
    Location
    Norway
    Posts
    1,595

    Re: Once again i need help ._.

    Worked! Thanks dood, you will be credited in the game
    Sway bought me VIP a few years back. Respect.


 

Posting Permissions

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