Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Dec 2003
    Location
    lv
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Songs that Sing to You When You Hear Them

    OKAY, fellers, this is it. Once I figure this out, I will know EVERYTHING there is to know in the whole universe, which is strange, cause this is pretty low level stuff.

    I have this scene with a bunch of crudely line-drawn people at an office party. I have applied a drag function, so that each person can be dragged and dropped. The instructions are "Help! It's been a long weekend, and we've forgotten how to mingle. Could you show us how it's done?"

    The user then drags and drops the party people. If he puts them in the right order, they sing to him. Basically, I need to assign each of six people a window of coordinates they can fall between, and when they are all in their proper windows, a song starts. How in the blank can this be done?

    Thanks,

    James
    Hey, look at my signature. It's how I'd like to be remembered if I die, and those odds are good.

  • #2
    New Coder
    Join Date
    Dec 2003
    Location
    lv
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Addendum

    Oh, wait. Here's another idea. Instead of a set window, the images just have to be in a certain order. Can you do this based on z-index value?
    Hey, look at my signature. It's how I'd like to be remembered if I die, and those odds are good.

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    z-index defines which element is on "top". All you need to do is make a check everytime anyone is moved to see if they're in the right order.

    You only need to have an array of the "x" positions, with the leftmost (your perspective) person first in the array and the rest of the people in the array in the appropriate order. Then when any one of the people are moved you check the array to see that the "x" values ascend, once they do start the song.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

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