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. Welded Blocks

Welded Blocks

Scheduled Pinned Locked Moved Help
2d-blockshelp
10 Posts 4 Posters 2.6k 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.
  • GreeniWasTakenYTG Offline
    GreeniWasTakenYTG Offline
    GreeniWasTakenYT
    wrote on last edited by jeffreyrb03-gmail
    #1

    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

    CreatiCodeI 1 Reply Last reply
    1
    • GreeniWasTakenYTG GreeniWasTakenYT

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

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

      @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

      GreeniWasTakenYTG 1 Reply Last reply
      1
      • CreatiCodeI CreatiCode

        @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

        GreeniWasTakenYTG Offline
        GreeniWasTakenYTG Offline
        GreeniWasTakenYT
        wrote on last edited by
        #3

        @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

        CreatiCodeI JaecadeJnightJ 2 Replies Last reply
        1
        • GreeniWasTakenYTG GreeniWasTakenYT

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

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

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

          GreeniWasTakenYTG 1 Reply Last reply
          1
          • GreeniWasTakenYTG GreeniWasTakenYT

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

            JaecadeJnightJ Offline
            JaecadeJnightJ Offline
            JaecadeJnight
            Mod Helper
            wrote on last edited by
            #5

            @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
            0
            • CreatiCodeI CreatiCode

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

              GreeniWasTakenYTG Offline
              GreeniWasTakenYTG Offline
              GreeniWasTakenYT
              wrote on last edited by
              #6

              @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_T 1 Reply Last reply
              0
              • GreeniWasTakenYTG GreeniWasTakenYT

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

                Tyller_T Offline
                Tyller_T Offline
                Tyller_
                trusted helpers
                wrote on last edited by
                #7

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

                GreeniWasTakenYTG 1 Reply Last reply
                0
                • Tyller_T Tyller_

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

                  GreeniWasTakenYTG Offline
                  GreeniWasTakenYTG Offline
                  GreeniWasTakenYT
                  wrote on last edited by
                  #8

                  @tyller_ can you show the example?

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

                  CreatiCodeI 2 Replies Last reply
                  0
                  • GreeniWasTakenYTG GreeniWasTakenYT

                    @tyller_ can you show the example?

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

                    @s9205307-810c679a

                    We will provide an example.

                    1 Reply Last reply
                    1
                    • GreeniWasTakenYTG GreeniWasTakenYT

                      @tyller_ can you show the example?

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

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