Results 1 to 2 of 2

Thread: Damn, more problems. I got collision detection to work fairly well on ONE object, but

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 1999
    Posts
    65

    Post

    Can one of you, tell me the complete way to keep one image from entering another? Like in Zelda 1, where you can't walk into trees, or bricks. But you can walk anywhere on the floor you'd like.

    Let's say you have two objects of equal size, and one moves at the speed of 20 increments per keypress. You don't want object 1 to enter object 2. How would you stop this?

    Please tell me the full code, or as much as you know.

    That is all.

    ------------------
    "I'm carrying a Geometry book, but I'm not in Geometry...it's crazy...crazy man!"

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    Personally, I use timers to move. I say:
    If keycode = vbkeyup then timer1.enabled = True...and I do the same in keyup just the timer is disabled. I do this because, you have smoother animation, and if a collition is detected, The timer for that direction is disabled. If this confused you in any way, please e-mail me, and I will send you a bit of code showing what I mean.

    Steve ([email protected])

    [This message has been edited by SteveCRM (edited 11-13-1999).]

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