Home / Topic / Memory game more 8 card

Memory game more 8 card

Home Kwiksher Forums Help me! Memory game more 8 card

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #10988

    Hello 🙂I ask to help,that it is necessary to change in a code that it was possible to use more than 8 cards.pictures with the name p_12 accepts as 2In advance many thanks 😉


    if (flips < 2) then composer.trans.newTransition_743 = transition.to( self, {alpha=0, time=100, delay=0})if flipped[1] ~= self then flips = flips + 1; if flips > 2 then flips = 2 endtable.insert(flipped,self) endelseif flips == 2 then flips = flips + 1;if flips > 2 then flips = 2 endif flipped[1] ~= self then composer.trans.newTransition_743 = transition.to( self, {alpha=0, time=100, delay=0})table.insert(flipped,self) if (randList[tonumber(string.sub(string.reverse(flipped[1].name),1,1))] == randList[tonumber(string.sub(string.reverse(flipped[2].name),1,1))]) thenflipped[1].x = 5000flipped[2].x = 5000flips = 1flipped = {} elselocal function hideAgain()composer.trans.newTransition_898 = transition.to( flipped[1], {alpha=1, time=100, delay=0})composer.trans.newTransition_888 = transition.to( flipped[2], {alpha=1, time=100, delay=0})local function zeroesFlip()flips = 1flipped = {}endcomposer.timerStash.timer_fl = timer.performWithDelay( 100, zeroesFlip, 1 ) endcomposer.timerStash.timer_AP = timer.performWithDelay( 200, hideAgain, 1 ) endendend


    Anonymous
    #17601

    Alex please helpit is necessary to change this line?______________________________________________________________________if (randList[tonumber(string.sub(string.reverse(flipped[1].name),1,1))] == randList[tonumber(string.sub(string.reverse(flipped[2].name),1,1))]) then______________________________________________________________________

    Anonymous
    #17602

    You will need to review this line but also the entire structure of the logic behind (to accept numbers with more than 2 digits). Unfortunately, I don't have the time to re-think/-re-write this tutorial for more cards at this moment. Hopefully others will jump and help here. Sorry 🙁

    Anonymous
    #17603

    Alex thank you for your information.I will wait council 🙂

    jamilebilbaosd7083
    Participant
    #17604

    Please try that:Your tList for 12 cards should be: tList = {1,1,2,2,3,3,4,4,5,5,6,6} -- Holds the number of each card


    External code for ShuffleCards: -- Add positions for additional cards: -- Positions each photo example:      local cards = { {456,376}, {835,376}, {1213,376}, {1591,376}, {456,768}, {835,768}, {1213,768}, {1591,768}, {456,1168}, {835,1168}, {1213,1168}, {1591,1168} }


    External Button code line should be changed to ( as long as you use the name " cover1" to "cover12"):if (randList[tonumber(string.sub((flipped[1].name),6,7))] == randList[tonumber(string.sub((flipped[2].name),6,7))]) then


    And don

    jamilebilbaosd7083
    Participant
    #17605

    Oh, the forum truncated my post….. 😉And dont forget:if                  layer.cover1.x == 5000 and                  layer.cover2.x == 5000 and                  layer.cover3.x == 5000 and                  layer.cover4.x == 5000 and                  layer.cover5.x == 5000 and                  layer.cover6.x == 5000 and                  layer.cover7.x == 5000 and                  layer.cover8.x == 5000 and                  layer.cover9.x == 5000 and                  layer.cover10.x == 5000 and                  layer.cover11.x == 5000 and                  layer.cover12.x == 5000                   then

    Jorge
    Participant
    #82539

    Who can help?
    Where should I put the code below? Does it replace anything?

    if layer.cover1.x == 5000 and layer.cover2.x == 5000 and layer.cover3.x == 5000 and layer.cover4.x == 5000 and layer.cover5.x == 5000 and layer.cover6.x == 5000 and layer.cover7.x == 5000 and layer.cover8.x == 5000 and layer.cover9.x == 5000 and layer.cover10.x == 5000 and layer.cover11.x == 5000 and layer.cover12.x == 5000 then

    Thanks in advance.
    Jorge

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Privacy Preference Center

Strictly Necessary

these coolies are for WP-SpamShield, gdpr-wp, woocommerce, paypal

PHPSESSID, SJECT16, JCS_INENREF, JCS_INENTIM, gdpr, woocommerce_cart_hash, woocommerce_items_in_cart, woocommerce_recently_viewed, wordpress_, wordpress_logged_in_, wordpress_sec_, wordpress_test_cookie, wp_woocommerce_session_, AKDC, akavpau_ppsd

Functionality

WordPress cookie created when auto-saving a post in the editor.

wp-saving-post, wp-settings-, wp-settings-time-

Performance

google analytic

__utma,__utmb,__utmc,__utmz,_ga,_gid,_gat

Advertising