Puzzle (Demo) to Next Scene.

bryantmainobryantmaino Member Posts: 30
edited November -1 in Working with GS (Mac)
Im using template "Puzzle (Demo)" to make my next game. I am trying to get it so when all Three Puzzle Pieces are matched it changes to the next scene. Any help?

Comments

  • butterbeanbutterbean Member Posts: 4,315
    You can create a global integer attribute called "Puzzle In"

    When the puzzle clicks in place, change attribute "puzzle in" to "puzzle in" +1 (do this for each puzzle actor)

    Then create another rule, when "Puzzle in" = 3, change scene, good job, or whatever you put in there :)
  • bryantmainobryantmaino Member Posts: 30
    Does it matter that actor is Self Identified? Using Unique Numbering
  • butterbeanbutterbean Member Posts: 4,315
    No because you're using a global integer attribute to track when the puzzle goes in, because you need to track when it = 3 to move to the next scene (you can also use a scene attribute as well to track these)
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    havent checked the demo and about to run out the door but i imagine it would be something like this:

    2 self attribute in each piece called correctPositionx and correctPosiitonY, and a game attribute called correctPieces.

    In the pieces have the self attribute set to the correct position it should go to. So if piece one's correct place is x position 5 and y position 5 have its self attributes set to 5 and 5.

    Then a rule in each piece when self position x=attribute correct position x, when self position y= attribute correctPosiitonY, and when mouse button is up( so it doesn't automatically count if you don't let go to place the piece)

    -change attribute correctPieces to correctPieces+1

    Then have a rule when correctPieces= (number of pieces you have, so if theres 10 it would be when it equals ten so it knows all ten are correct)
    -change scene

    sorry if its sloppy or i missed something or theres a easier way, im running out the door but figured i would brainstorm real quick :)

    edit: wow it take me 7 minutes to type that LOL
  • bryantmainobryantmaino Member Posts: 30
    @butterbean, that didn't work? Not sure why.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    try what i posted
  • bryantmainobryantmaino Member Posts: 30
    @JohnPapiomitis, that didn't work either?
  • bryantmainobryantmaino Member Posts: 30
    Actually it worked! Thanks JohnPapiomitis
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Anytime. Just got back and tested and was about to ask you to post a screenshot to see if you had anyother behaviors conflicting, cause it works for me.

    Glad you got it working
Sign In or Register to comment.