Drag and Drop (poker game)

sebmacflysebmacfly Member Posts: 1,018
edited November -1 in Working with GS (Mac)
Hi!

I would like to add an "All-in" using drag and drop, in my poker game...

How can i drag all the chips from my table, to the yellow square (see the picture)

If i drag the chips to anywhere in the yellow square, i will bet all my chips. And if i drag the chips, but i replace it on my table, that will cancel my bet.

Do you know how can i do it?

Thank you...

Here is the picture : http://www.imagup.com/data/1110673293.html

Comments

  • crapscraps Member Posts: 353
    I see that you have a bet, call, raise etc buttons. If touched do they automatically place a predetermined bet for the player? if so why don't you make an "all in" button that will bet the "bankroll"
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    If you want it to be dragged you can always use multi touch so say you drag the chips and if touch count =4 it bets yyour whole bankroll and moves all the chips
  • sebmacflysebmacfly Member Posts: 1,018
    @Craps :
    You're right, i wanted to do it... but now, i want to do it with a dra and drop, like in a real poker game, when you drag all your chips...

    @John' :
    I don't understand, can you describe me the rules please?

    Thanks guys
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    under device attributes youll see touch count. Thats the amount of touchs are on the screen at the same time. So you can have a rule in the chips when touch count =4 (when theres 4 fingers on the chips) then have your rules to add all your bankroll to the bet andmove them up. That way no other touches interfere with the chips, and you can only go all in when you drag with 4 fingers.
  • sebmacflysebmacfly Member Posts: 1,018
    Ahhh ok i see, but i need to make it with 1 finger only, i just can't figure how to drag the chips actor to the yellow square... And when i release it in that square, so i can bet all my chips
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    well you can have when touch is pressed constrain self position x to touch x and self position y to touch y (in the chips actor) and then when touch is releasd adn actor(chips) overlaps over collides with the square change your bet to all chips
  • sebmacflysebmacfly Member Posts: 1,018
    Thank you very much, i'll try that and let you know :)
Sign In or Register to comment.