checking if two selected objects match

jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
edited November -1 in Working with GS (Mac)
I'm working on a new game, and I need the user to be able to select two objects, if they match destroy them, if they are not the same do nothing and clear out the selections.

I've done the easy part :) I can easily select the first object, but i can't figure out how to select the 2nd object. When I touch the first, it automatically fills in the second one, which is bad logic on my part. I did some searching, and it looks like tshirtbooth did a demo awhile back, but I can't actually find it, I only see people talking about it.

is there an easy way to do this I'm just not seeing?

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    as usual, after I post a request for help I figure it out :) I just needed a .1 second timer on the first selection so it didn't trigger the rule for the second one
  • ClaudiaHoldorpClaudiaHoldorp Member Posts: 16
    Can you explane me how i can select two objects in the game. I make a game where you can in the beginning select who plays against who so i need to select two players.
    I have know idea how to do that.
  • old_kipperold_kipper Member Posts: 1,420
    I would display buttons with art for each actor that a player can select and the when the button is pressed have it change the displayed button to a selected state and change a game integer attribute to a number that is referenced in each scene to spawn the chosen actor, or an animation and rule set within an actor. If you use an actor with different art and possibly rules for a selected player, then I would use an actor which changed dependant on the game attribute. This might have a higher memory usage, as it contained all the art for every option.

    I hope that helps

    Kipper
  • ClaudiaHoldorpClaudiaHoldorp Member Posts: 16
    thanks!
Sign In or Register to comment.