Navigation

    CreatiCode Scratch Forum

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

    Reference a Clone

    Help
    2
    6
    506
    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.
    • Tyller_
      Tyller_ Best Forum Helpers last edited by

      How do I reference a clone sprite? I’m trying to use 2D physics to make a rope, I have a loop spawning each clone with a clone ID that is one higher then the last and a local sprite variable isClone to tell if they are a clone or not, when I manually press create a clone and check a physics block sprite input it shows multiple of the Rope sprite’s name with all checked off when I check any of them, I can provide a screenshot or project link if this is too confusing.

      I just need to reference the entire sprite of a clone, not just a property of it like possible in the sensing block property of sprite. (PS: Sorry that this is very long, I gave some context alongside the question so people wouldn’t need to ask me so many questions)

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

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

        @jaysen4games-gmail

        Hi, it would be great if you could provide a project link. We will help you find a solution. And thanks for the detailed description. That helps a lot.

        CreatiCode

        Tyller_ 1 Reply Last reply Reply Quote 0
        • Tyller_
          Tyller_ Best Forum Helpers @info-creaticode last edited by

          @info-creaticode https://play.creaticode.com/projects/c1b14a54d877d843799b4655

          in the rope sprite I tried to use clone id-1 but it didn’t work and ended up having them attached to nothing

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

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

            @jaysen4games-gmail

            Thanks for the project link. That’s an interesting project.

            You are right that there is no simple way to refer to the clones when setting the rotation axis. We have just made an update to support it using the format of “sprite name|clone id”.

            As shown below, the first clone would link to the sprite named “Rope|originalsprite”, since the original rope sprite’s clone ID is “originalsprite”. The second clone would link to the sprite named “Rope|1”, which is the first clone. The same for the remaining clones.

            3c6d44f4-b01b-41d1-857c-3d5de884bca5-image.png

            The demo project is shared at https://play.creaticode.com/projects/650b8f77fe0a145f53bbdaf8

            Tyller_ 1 Reply Last reply Reply Quote 0
            • Tyller_
              Tyller_ Best Forum Helpers @info-creaticode last edited by Tyller_

              @info-creaticode thank you, I’ll update the project with this format

              PS: I had to refresh the page to post this and it was giving me a popup denying me posting saying “Forbidden”, I think it’s cause I left this tab open for technically over night but something to note

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

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

                @jaysen4games-gmail

                Yes, that’s most likely due to a timeout from a long idle period.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post