Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Help
  3. Forever loop won't work for 2 clones in a single sprite:

Forever loop won't work for 2 clones in a single sprite:

Scheduled Pinned Locked Moved Help
5 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • TheNicknameGovT Offline
    TheNicknameGovT Offline
    TheNicknameGov
    trusted helpers
    wrote on last edited by
    #1

    778be221-058d-4031-be9f-58d1a9a06fd5-Screen recording 2025-04-13 12.41.15 PM.gif

    (CB1 is top button, CB2 is bottom one)

    The second small “when I start as a clone” string is the only one that works, the first one doesn’t. I know that I added an "add clone with clone ID “CB1” otherwise the top button wouldn’t have appeared in the first place. Can you tell me what the problem is?

    Please help all my projects are 3000+ blocks

    CreatiCodeI 1 Reply Last reply
    0
    • TheNicknameGovT TheNicknameGov

      778be221-058d-4031-be9f-58d1a9a06fd5-Screen recording 2025-04-13 12.41.15 PM.gif

      (CB1 is top button, CB2 is bottom one)

      The second small “when I start as a clone” string is the only one that works, the first one doesn’t. I know that I added an "add clone with clone ID “CB1” otherwise the top button wouldn’t have appeared in the first place. Can you tell me what the problem is?

      CreatiCodeI Offline
      CreatiCodeI Offline
      CreatiCode
      wrote on last edited by
      #2

      @the_true_odst

      Looking at your code, 2 questions come up:

      1. Are you sure those clones with clone ID of “CB1” and “CB2” are both created?

      2. Since the code under “when I start as a clone” is all the same except the clone ID, why not use an “or” block to check both conditions?

      TheNicknameGovT 1 Reply Last reply
      0
      • Tyller_T Offline
        Tyller_T Offline
        Tyller_
        trusted helpers
        wrote on last edited by
        #3

        @the_true_odst first, I’d recommend maybe using an if else, second, add a say to the start as clone block to verify tehy exist and where they are

        <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
        </div>

        1 Reply Last reply
        0
        • CreatiCodeI CreatiCode

          @the_true_odst

          Looking at your code, 2 questions come up:

          1. Are you sure those clones with clone ID of “CB1” and “CB2” are both created?

          2. Since the code under “when I start as a clone” is all the same except the clone ID, why not use an “or” block to check both conditions?

          TheNicknameGovT Offline
          TheNicknameGovT Offline
          TheNicknameGov
          trusted helpers
          wrote on last edited by
          #4

          @info-creaticode said in Forever loop won't work for 2 clones in a single sprite::

          Are you sure those clones with clone ID of “CB1” and “CB2” are both created?

          Yes, the top button is CB1, and the second button is CB2

          Please help all my projects are 3000+ blocks

          1 Reply Last reply
          1
          • Tyller_T Offline
            Tyller_T Offline
            Tyller_
            trusted helpers
            wrote on last edited by
            #5

            @the_true_odst make it so if they touch it they say something or use print to console. This is how most programmers (allegedly people using languages other than JS dont do this but I still doubt that) debug stuff, you add a bunch of prints to ensure what is broken, like is it the touching detection or the cursor, you dont know becuase if one doesn’t work, the other won’t (if touching doesnt work then the cursor will never change, if the cursor changing doesnt work you wouldn’t know becuase the touching would be trying to use something that’s broken)

            <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
            </div>

            1 Reply Last reply
            1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • CreatiCode