dcsimg
A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: [MX04] platform physics

Threaded View

  1. #1

    [MX04] platform physics

    Hey everyone,

    I've got a little dilema with a game I'm working on. I'm working on a sidescrolling platform jumper, like Super Mario Bros. I'm having trouble making the characters stand on the platforms, fall off of the platforms, and fall off of the platforms.

    Well, right now 've got a main character in which you controll, he works fine. The way I did it was by adding the code to detect the platforms correctly on the platform MCs themselves. I thought it would work out alright, but now I've added an enemy, and this is when I realized that in order to have all of the enemies follow the same physics, I would have to take the large chunk of code I made for the main character to land on the platforms, and copy it over again for EACH enemy in the level.

    I'm sure there is a way to have the code added to the enemy/character itself without putting all that code on each platform. Though I couldn't figure it out. Even if I keep the code on each platform for the main character, I am still looking for a code to put on each enemy to work.

    I understand that this all may be a little hard to follow or interpret without seeing the code for it, so I'll upload the fla for you.

    Thanks,
    ~Bill
    Attached Files Attached Files
    So many Ideas

    So little Time

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