calculations

GdoggGdogg Member Posts: 95

hi, I want to change attribute, game.count to game.count +1 so this way it counts 1234 etc..
now when i reach count +4 i want it to equal +1,.. when the game.count reaches+8 i want the game count to equal+2
basicly every +4 should equal +1..

I need some help on this. cheers

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Change GameCount to GameCount+0.25

  • GdoggGdogg Member Posts: 95

    thanx

  • GdoggGdogg Member Posts: 95
    edited April 2014

    I have created in game.. integer touch ""

    in display text ((game.touch a)13/52+(game.touch k)13/52+(game.touch q)13/52+(game.touch j)13/52+(game.touch 10)13/52+(game.touch 2)13/52+(game.touch 3)15/52+(game.touch 4)13/52+(game.touch 5)13/52+(game.touch 6)13/52+(game.touch 7)13/52+(game.touch 8)13/52+(game.touch 9)13/52)/121

    It count Precise at 52 cards equals 1 deck... what i really want is if any suite of card has reached/drawn 4 cards then it would equal 1 deck, but i don't want to add cards together,

    which ever card, or if all has reached 4 of a kind i want 4 to represent as 1 deck and 8 to represent as 2 decks and so on..

    i may need a bit of help.. cheers

  • SocksSocks London, UK.Member Posts: 12,822

    Haven't got a clue what any of that means.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    @Socks said:
    Haven't got a clue what any of that means.

    And here i thought you were a math wiz... Im disappointed in you.

  • SocksSocks London, UK.Member Posts: 12,822

    @tenrdrmer said:
    And here i thought you were a math wiz... Im disappointed in you.

    I only do Flappy Bird stuff now.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    @Socks said:
    I only do Flappy Bird stuff now.

    My apologies. I retract my last statement. I now have never been more proud if you!

  • GdoggGdogg Member Posts: 95

    sorry guys, what i mean in layman's terms, say i had 13 sets of 4, total of 52 card.
    ie: spades, diamonds, hearts and clubs being the 4 sets...
    ie: a,k,q,j,10,2,3,4,5,6,7,8,9 being the cards equals 52 in total.

    now i need a code that can identify/delegate when the sets have retrieved 4... and 4 is because each is spades, diamonds, hearts and club... and saying that 4 would equal "1 deck", because there is only 4 sets in one deck of cards, so we now know that the 4 sets retrieved have been shown, when say dealt by the dealer.

    I do not addition with all the cards, because it is not accurate in real play.

    ie( card a- card K+ card Q) which would equal 3..

    it should identify only the sets on the same card, for only the sets that have the highest sets, ie... a-spades,heats,clubs,diamonds =1 set. or A-spades,spades,hearts hearts, clubs, clubs,diamonds, diamonds,= 2 sets

    cheers

  • GdoggGdogg Member Posts: 95

    say if i had a number of keys, and each time i pressed the keys they would produce an amount of numbers each key had been pressed, now i want is and attribute that can pick out out of the bunch which key had been pressed the most. cheers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Gdogg said:
    say if i had a number of keys, and each time i pressed the keys they would produce an amount of numbers each key had been pressed

    Let's start with this. As an example, I press T and then D and then D again and I see T:1, D:2?

    @Gdogg said:
    now i want is and attribute that can pick out out of the bunch which key had been pressed the most.

    You would need to keep each key count in a row of a table and then loop over the table rows (the Release Candidate makes that really simple) to determine the highest value and change an attribute to that value.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • GdoggGdogg Member Posts: 95
    edited April 2014

    yes thats its, i always had the tables in mind, but i am only a newbie trialing by error and so forth trying to understand gamesalad fast. thanx for your insite. i have downloaded the latest release canidate, on mac.. im still fiddling with.. , but im still trailing behind..
    anyway much appreciated for your help, so far what ive been doing is changing an atribute for each card and dividing by , this has given me a false indication because in the end 52 cards equal one deck, but does not give me the correct deck,,, because as we all know once you have a suite x 4 of the same kind, we know one deck has passed.. thats the trail that im trying to fix... devide /4 =.25 x4 =1, 1 equals 1 deck.

    and every card at some point in play would have reached 9 suits, as an example, we know there is 2 .25 decks that have already been delt by the dealer.

    so this attribute would detect the highest of all the cards and calculate the suit of card to how many decks have been delt . my first version of black jack buster is already on itunes, but its just a simple card count, then i came with version 2, gives the amount of cards in addition, delt with the highs and lows, the next will "calculate the highs and lows" with the decks to give as precise indication

    thanx all.

Sign In or Register to comment.