Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 3 of 3

Thread: Art based movement 8 directions

  1. #1

    Art based movement 8 directions

    [FIXED] Thanks anyway guys, but I fixed it just then.

    Hey guys, It's been a long time since I've touched Flash in regards to gaming, but I've been wanting to get back in to the scene for a while now, and I started a little project last night and need some help.

    I'm wanting to make a simple little art based engine where a character can walk in all directions, much like Double Dragon or Dad'n'Me. I've got the walking down fine, it's just the collision detection between the hero and the walls I am having trouble with. Whenever the hero hits a wall, he flickers back and forth between standing and walking. Now, I know why this is happening, I'm just not sure what other methods I could use.

    Ive attached the FLA to this post, and it's set up very simply, so any help would be great. Cheers.

    Code is located on _root, and on the 2 individual MC's ("stand" and "run") inside the HERO MC.
    Attached Files Attached Files
    Last edited by Skribble; May 12th, 2008 at 03:28 AM.

  2. #2
    Registered User
    Now, I know why this is happening,
    Why is this happening?

  3. #3
    It was because whenever he hit a wall, I was telling him to go back to heroStand, and on heroStand, if you are pressing a directional key, he is sent back to heroRun. So the result was a constant switching between stand and walk whenever he hit the wall.

    To remedy this, I changed the code on heroStand to check for any walls BEFORE sending the hero to heroRun, that way, he just doesn't move if he is against a wall.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012