Results 1 to 3 of 3

Thread: Objects

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2004
    Location
    Canada
    Posts
    12

    Objects

    Get objects to fall from the top of the screen. Then dissapear when it hits the command button at the the bottom. I have the command working but when the object hits it it bounces off and keeps on going. How do I make the things fall from the screen then dissapear when they hit the command button?

  2. #2
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    I am assuming that these objects are square (as with the command button) and that when you mean by "hit", you mean the bottom of the object hits the top of the command button.

    In order to do this, you have to check to see if:
    bottom coor. of object <= top coor. of cmd button.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  3. #3
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Some pseudo code to help out understanding what Darkwraith just said:


    VB Code:
    1. If (cmdButton.top >= objFalling.top + objFalling.height) then
    2.      'Hide it or something else...
    3. End if

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