There are some very very smart people on this forum so i ask my hardest question

xyloFUNxyloFUN Member Posts: 1,593
edited November -1 in Working with GS (Mac)
So far, I have been helped beyond my expectations. This forum is GREAT!! Unbelievable!

Now comes my last task that, should i be able to implement, would make Flash redundant for what I do!!!

Here it goes ....

Say you made a game for a child that teaches the child the colour names!
Is it possible to implement a function that lets children drag a cube to a specific location, than repeat this a few more times by adding different cubes AND THEN have GS read out the colour values depending on what cube was drooped on what spot?

I know this is tricky and I use an array in ActionScript .... am I reaching for the starts here?

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    You can do that, but you have to set up some game and self attributes, eventually changing and/or constraining coordinates for the dragged cubes etc.

    It is depending on what you exactly want to do. What should happen if the player did the right thing, what should happen if he didn't etc.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Joe has a drag and drop demo on his wall (FireMapleGames)

    I would start with that. Then in each drop target you could have a rule.

    Rule: When game.ReadColors is true
    ----Rule: When overlaps with actor of type RedBlock
    --------Play Sound red.ogg

    ----Rule: When overlaps with actor of type BlueBlock
    --------Play Sound blue.ogg

    So have something trigger the game.ReadColors (a button or a rule that checks if all of the spaces are filled or whatever) and then the above rule will read the colors. You will probably want a timer in each so they don't all read at once.
  • MagoNicolasMagoNicolas Member, PRO Posts: 2,090
    For Grabbing, You need to Constrain Attirbute to Touch.
    For Reading Values, you need a counter, that counts when the cube is placed on the right spot.
  • ChaserChaser Member Posts: 1,453
    If certain cube overlaps or collides with the corresponding actor location then play sound (color name)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    First off Interpolate the position of the cubes to touch 1. Then say you have 4 spots where you want to place cubes on and four cubes, you would do it like this. Say your cubes are called blue, red , green yellow. THen you have spots to place them one which you can call blue place, yellow place, red place, green place. Then go into the first cube ( well use blue) and have rule when actor overlaps or collides with actor blue place, play sounds blue (or whatever behaves you want to do. Then in the same blue cube actor have rules when it overlaps or collides with the other places(green place, yellow place, red place) play sound horn( or whatever you want to use to indicate its not in correct spot.) Then do the same for the red cube when actor overlaps or collides with actor red place play sound red, then make rules when actor overlaps or collides with blue place, yellow place, green place, play horn(or whatever you chose). Then do the same with the remaining ones matching the color cubes to the correct place for the color sound behavior, and the negative sound for when it overlaps with the wrong place. Hope you understand that well.
  • xyloFUNxyloFUN Member Posts: 1,593
    I can't believe it!

    Not in my wildest dreams did I expect that many answers ...

    @ hunnenkoenig
    Yes, that is how I did it in Flash as well. There are dotted squares and the user can drag "any" cube in there in any order. When the play button is clicked, the script will sound out the sequence.

    @ scitunes
    thanks, I will check it out! :)

    @ MagoNicolaus
    Yes, that sounds like it's heading in the right direction (sounds familiar to what I need)

    @Chaser,
    have you done something like that and if yes, would you care to elaborate a bit more if you have time? thanks :)

    @ JohnPapiomitis
    thank you again for the details! You are close to what I need to do but what I'm actually after is this ...

    predefine 4 "markers" (Can be semi transparent actor, 80 x 80 in size to act as placeholders

    make 6 actors, 50 by 50 pixels in size and give them each an individual colour

    let the user pick any of the six cubes and place them "inside" any of the four placeholders

    once all four (or three or two or just one) spaces are filled, let the user click once more on a "play" button and then have GS say the colour names out loud.

    It is a little like composing but with colours instead of notes.

    Guys, after reading all your replies, I have hope that this can be done! :)
  • ChaserChaser Member Posts: 1,453
    In a way Ghost Words does this with some 60+ words when touched by the ball or a finger it plays a sound. All you have to with the blocks is constrain them to touch however if you need them to go exactly in the hot spot then play with interpolate
    http://itunes.apple.com/us/app/ghost-words/id354092793?mt=8
Sign In or Register to comment.