Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

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

    Help
    3
    5
    111
    Loading More Posts
    • 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.
    • The_True_Odst
      The True ODST Best Forum Helpers last edited by

      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?

      ODST: Orbital Drop Ship Trooper
      (Halo Reference)

      info-creaticode 1 Reply Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @The_True_Odst last edited by

        @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?

        The_True_Odst 1 Reply Last reply Reply Quote 0
        • Tyller_
          Tyller_ Best Forum Helpers last edited by

          @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 Reply Quote 0
          • The_True_Odst
            The True ODST Best Forum Helpers @info-creaticode last edited by

            @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

            ODST: Orbital Drop Ship Trooper
            (Halo Reference)

            1 Reply Last reply Reply Quote 1
            • Tyller_
              Tyller_ Best Forum Helpers last edited by

              @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 Reply Quote 1
              • First post
                Last post