Navigation

    CreatiCode Scratch Forum

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

    Welded Blocks

    Help
    2d-blocks help
    4
    10
    499
    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.
    • GreeniWasTakenYT
      GreeniWasTakenYT last edited by jeffreyrb03-gmail

      I need help to make blocks that stick together until force is applied to it. Can someone help me?

      when life give you toasters, make toasterade… something like that

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

        @s9205307-810c679a

        I assume you are using the 2D physics engine. You can use the “fix relative position to [OBJECT]” block to make one object remain the same relative position to another object. You need to make sure they are positioned next to each other before running that block.

        To break them apart, you can use the “remove relative positon constraint” block.

        Here is a demo. The 2 boxes are welded together initially, but when you click the green box, it will remove the constraint.

        https://play.creaticode.com/projects/6702f17a72890f104819adea

        GreeniWasTakenYT 1 Reply Last reply Reply Quote 1
        • GreeniWasTakenYT
          GreeniWasTakenYT @info-creaticode last edited by

          @info-creaticode Thanks for the example! Do you have any way to do this for clones of one sprite?

          when life give you toasters, make toasterade… something like that

          info-creaticode jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
          • info-creaticode
            CreatiCode @GreeniWasTakenYT last edited by

            @s9205307-810c679a

            If you are using the 2D physics engine, then each sprite corresponds to one physics object.

            You will have to create clones of both boxes, and bind them together when they are created in your code.

            GreeniWasTakenYT 1 Reply Last reply Reply Quote 1
            • jeffreyrb03-gmail
              JaecadeJnight Mod Helper @GreeniWasTakenYT last edited by

              @s9205307-810c679a I’m not too familiar with 2d stuff since I use CreatiCode for it’s 3d blocks more, but wouldn’t you be able to use the When I start as a clone hat block, and then do the welding from there? Maybe try that

              #LLJW
              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

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

                @info-creaticode Screenshot 2024-10-09 9.53.57 AM.png yeah but how would I show this using clones?

                when life give you toasters, make toasterade… something like that

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

                  @s9205307-810c679a CreatiCode added clone reference after a request in 2d physics I made, to reference clones it’s “spritenname|cloneid”, which can just be one join block
                  Join(sprite|)(clone id)

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

                  GreeniWasTakenYT 1 Reply Last reply Reply Quote 0
                  • GreeniWasTakenYT
                    GreeniWasTakenYT @Tyller_ last edited by

                    @tyller_ can you show the example?

                    when life give you toasters, make toasterade… something like that

                    info-creaticode 2 Replies Last reply Reply Quote 0
                    • info-creaticode
                      CreatiCode @GreeniWasTakenYT last edited by

                      @s9205307-810c679a

                      We will provide an example.

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

                        @s9205307-810c679a

                        The example project above has been updated to create 2 clones of each box, and set up the fixed relative position constraint between them.

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