99Instances2Go's Recent Forum Activity

  • And you need an other payout for 'four of a kind', and for the special case of 'four of a kind': the 'Five of a kind'. That is 4 aces + 1 joker.

  • You did not mention "Joker Poker Video Poker" at all.

    I dont know if there is only 1 joker in poker, i suppose there is.

    Just add the joker to a new animation. Now it needs its own chance calculation. Because it is not the same chance to occur as a regular card. I guess it is 1 on 53.

    so ... after choosing the cards and if ... floor(random(0,54) = 0 then pick a random card and change its face to a joker.

    Store the fact that there is a joker or not in a global variable. That will easy it up already some, later on.

    Now the easy method would be a loop.

    If there is a joker ..... loop all the 'checking' while iterating 'the card that has the face of the joker' to be every other card in the pack. Add the result for each check to a dictionary.

    If there is a joker

    __For all colors

    ___For all faces

    ______set joker card to card (color ... face)

    ______do the check

    ______store result in a dictionary

    Else

    _do the check

    _store result in a dictionary

    Choose highest payout from dictionary holding the results. (i suppose you dont want to cheat on it)

  • That is actual very easy to show, so you dont have to take me on my word.

    https://www.dropbox.com/s/ezceqtejd2u3x ... .capx?dl=0

    In fact, it is not exactly known when a trigger fires insight the tick. For the 'hardware readers' (mouse, keyboard, Ajax) there is no rule. It depends on the device and on the browser. Some triggers just have to run at the start of a tick, else they dont make sense. The 'On landed' by instance. Platform has a 'push out of solid' routine. Evaluating a position under 'On landed' should give the position after the 'push out of solid', even if you set the position to something else later in the events.

    The only thing that is for sure, is that a trigger fires only once in the same tick.

    A Group is just a condition as all other conditions. It has a system Boolean 'activated', false or true. And it will evaluate that Boolean every tick. Every condition under a condition is a sub condition.

    So, again. What happens of you bury a trigger (there are false triggers too) deep (or not that deep) down in sub events ? It triggers and looks up to find out if it can run its actions/subs.

    Do not quote me (stealing the possibility for me to erase my dumb comments, and dude, this whole forum has dumb post from me, till i learned something about the subject) and then offer to erase your own posts. Tyvm.

  • the code is always run downwards it would not go up to check if the group is active. if the group was not active the key press trigger will not even run.

    As you wish & whatever dude.

    Allow me to quote some one smarter

    --- left out a few lines here--

    Triggers in subevents check all their parent events are true, but the "else" is checked on its own without referring to previous events in that case, so it probably doesn't do what you want.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Haha, you quoted me, now i cant erase my stupid comments. Here goes :

    Legal maximum for Acurrent = Cmax

    Possible illegal maximum >> Bincome + Acurrent = bigger then Cmax

    Everything bigger then Cmax goes back to Bincome

    So .....

    Local variable temp

    temp = min(Bincome + Acurrent,Cmax)

    Bincome = (Bincome + Acurrent) - temp

    Acurrent = temp

    https://www.dropbox.com/s/yajxehyx8sxre ... .capx?dl=0

  • No, that is wrong, i suppose Acurrent cant be less than zero too.

  • (Cmax - Acurrent) = MaxFill

    If Bincome > MaxFill

    . .... then NewAcurrent = Acurrent - MaxFill

    & NewBincome = Bincome - MaxFill

    If Bincome <= MaxFill

    . ... then NewAcurrent = Acurrent - Bincome & NewBincome = zero

    Or getting MaxFill out there again (it explained well with)

    If Bincome > (Cmax - Acurrent)

    . .... then NewAcurrent = Acurrent - (Cmax - Acurrent)

    & NewBincome = Bincome - (Cmax - Acurrent)

    If Bincome <= (Cmax - Acurrent)

    . ... then NewAcurrent = Acurrent - Bincome

    & NewBincome = zero

    Under the assumption that Bincome cant be negative.

  • You do not have permission to view this post

  • Wait 0 = happens at the end of the tick that ran that wait.

    Any wait/delay escapes the scope of the function. Cant start a start time consuming task and return the result of it inside the same function. Unless you prolong the tick.

    A time consuming loop stays in the function. The tick just gets longer.

    But you can not use triggers inside a loop.

    And when the loop is running it will not (multitask) do anything else.

    So pretty useless for you. I think (but i am not the smartest) that you need another way.

  • Do you have the platform behavior attached to both ? To box & animation ?

  • Out of scope it cant return a value. The wait brings things out of scope.

    If its not a Ajax request, then what else would take time to complete inside the function ?

99Instances2Go's avatar

99Instances2Go

Member since 12 Feb, 2016

Twitter
99Instances2Go has 2 followers

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies