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. Feedback
  3. Add and option to change variables' belonging

Add and option to change variables' belonging

Scheduled Pinned Locked Moved Feedback
28 Posts 6 Posters 5.9k Views 3 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

    What I mean by this is, along with the “change variable’s name” when you highlight it, you should be able to also switch between “for all sprites” and “for this Sprite only.”
    This would be useful if you are trying to make the same variable with different sprites but you need them to be separate since you don’t already have them like that.
    Just deleting them would mess up all the previous coding.

    Please help all my projects are 3000+ blocks

    Tyller_T CreatiCodeI 2 Replies Last reply
    0
    • TheNicknameGovT TheNicknameGov

      What I mean by this is, along with the “change variable’s name” when you highlight it, you should be able to also switch between “for all sprites” and “for this Sprite only.”
      This would be useful if you are trying to make the same variable with different sprites but you need them to be separate since you don’t already have them like that.
      Just deleting them would mess up all the previous coding.

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

      @011830-0a42ef84 so what would happen if that variable is used in other sprites?

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

      TheNicknameGovT Mod. Squad TrainerM 2 Replies Last reply
      0
      • Tyller_T Tyller_

        @011830-0a42ef84 so what would happen if that variable is used in other sprites?

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

        @tyller_ It might get deleted or canceled out, but you should know whether or not it is only used in that certain sprite.

        Please help all my projects are 3000+ blocks

        Tyller_T 1 Reply Last reply
        0
        • TheNicknameGovT TheNicknameGov

          @tyller_ It might get deleted or canceled out, but you should know whether or not it is only used in that certain sprite.

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

          @011830-0a42ef84 you can make the code in one sprite and when you drag that code with a sprite only variable to another sprite, it will make that variable in that other sprite as a sprite only variable aswell

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

          TheNicknameGovT 1 Reply Last reply
          0
          • Tyller_T Tyller_

            @011830-0a42ef84 you can make the code in one sprite and when you drag that code with a sprite only variable to another sprite, it will make that variable in that other sprite as a sprite only variable aswell

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

            @tyller_ Well no, because I completely re-made the same sprite (without cloning) and had to set all variables in that sprite to “{variable name}2”

            Please help all my projects are 3000+ blocks

            Tyller_T 1 Reply Last reply
            0
            • TheNicknameGovT TheNicknameGov

              @tyller_ Well no, because I completely re-made the same sprite (without cloning) and had to set all variables in that sprite to “{variable name}2”

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

              @011830-0a42ef84 if you remake the same sprite without changes then you absolutely should be using clones with sprite only variables (sprite only variables are only across the specific instance, they aren’t shared by clones, clones have their own sprite only variable values)

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

              TheNicknameGovT 1 Reply Last reply
              0
              • Tyller_T Tyller_

                @011830-0a42ef84 if you remake the same sprite without changes then you absolutely should be using clones with sprite only variables (sprite only variables are only across the specific instance, they aren’t shared by clones, clones have their own sprite only variable values)

                TheNicknameGovT Offline
                TheNicknameGovT Offline
                TheNicknameGov
                trusted helpers
                wrote on last edited by TAO
                #7

                @tyller_ No, it has very similar coding and has all the same variables but it works differently than the other.

                Plus, cloning is weird and I don’t understand it (mainly detection and moving and stuff)

                Please help all my projects are 3000+ blocks

                1 Reply Last reply
                0
                • Tyller_T Tyller_

                  @011830-0a42ef84 so what would happen if that variable is used in other sprites?

                  Mod. Squad TrainerM Offline
                  Mod. Squad TrainerM Offline
                  Mod. Squad Trainer
                  wrote on last edited by
                  #8

                  @tyller_ If you are curious, both Scratch Addons and Turbowarp have this setting, so feel free to test it out.

                  1 Reply Last reply
                  0
                  • TheNicknameGovT TheNicknameGov

                    What I mean by this is, along with the “change variable’s name” when you highlight it, you should be able to also switch between “for all sprites” and “for this Sprite only.”
                    This would be useful if you are trying to make the same variable with different sprites but you need them to be separate since you don’t already have them like that.
                    Just deleting them would mess up all the previous coding.

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

                    @011830-0a42ef84

                    Are you referring to this tool on Turbowarp? It allows you to use another variable to replace the selected variable in the current sprite only.

                    43715d8c-3c83-4c53-a5dd-8a9fd9153c00-image.png

                    TheNicknameGovT Mod. Squad TrainerM 2 Replies Last reply
                    0
                    • CreatiCodeI CreatiCode

                      @011830-0a42ef84

                      Are you referring to this tool on Turbowarp? It allows you to use another variable to replace the selected variable in the current sprite only.

                      43715d8c-3c83-4c53-a5dd-8a9fd9153c00-image.png

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

                      @info-creaticode How do you get to that?

                      Please help all my projects are 3000+ blocks

                      silvloveS CreatiCodeI 2 Replies Last reply
                      0
                      • TheNicknameGovT TheNicknameGov

                        @info-creaticode How do you get to that?

                        silvloveS Offline
                        silvloveS Offline
                        silvlove
                        Mod Helper
                        wrote on last edited by
                        #11

                        @011830-0a42ef84
                        “Developer tools:”?

                        Forums Moderator.
                        Trans girl :3 ~ 14yo
                        Friendly and sometimes goofy~!

                        1 Reply Last reply
                        0
                        • TheNicknameGovT TheNicknameGov

                          @info-creaticode How do you get to that?

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

                          @011830-0a42ef84

                          On Turbowarp, you can right-click a variable in the block palette to open this dialog box. On CreatiCode, we don’t have it yet. We are researching if this is the best solution, or if we can do better.

                          475c7719-f4d2-4a36-90b1-92c29bcd062b-image.png

                          TheNicknameGovT 1 Reply Last reply
                          1
                          • CreatiCodeI CreatiCode

                            @011830-0a42ef84

                            On Turbowarp, you can right-click a variable in the block palette to open this dialog box. On CreatiCode, we don’t have it yet. We are researching if this is the best solution, or if we can do better.

                            475c7719-f4d2-4a36-90b1-92c29bcd062b-image.png

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

                            @info-creaticode I don’t think I can add that extension, but I would appreciate it if you could do this when you can.

                            Please help all my projects are 3000+ blocks

                            1 Reply Last reply
                            1
                            • CreatiCodeI CreatiCode

                              @011830-0a42ef84

                              Are you referring to this tool on Turbowarp? It allows you to use another variable to replace the selected variable in the current sprite only.

                              43715d8c-3c83-4c53-a5dd-8a9fd9153c00-image.png

                              Mod. Squad TrainerM Offline
                              Mod. Squad TrainerM Offline
                              Mod. Squad Trainer
                              wrote on last edited by
                              #14

                              @info-creaticode Not quite. I mean where you right click ang get an option “switch to for this sprite only”

                              CreatiCodeI 1 Reply Last reply
                              1
                              • Mod. Squad TrainerM Mod. Squad Trainer

                                @info-creaticode Not quite. I mean where you right click ang get an option “switch to for this sprite only”

                                CreatiCodeI Offline
                                CreatiCodeI Offline
                                CreatiCode
                                wrote on last edited by info-creaticode
                                #15

                                @mod-squadacademy-1bc96c56

                                as @Tyller_ pointed out, when you request to change a variable’s scope from shared to “this sprite only”, it is not clear what to do with blocks using this variable in other sprites. Some user might want to delete those blocks, some may want to keep them but using a separate shared variable.

                                It is much cleaner to do it in a 2-step approach:

                                1. create a new variable for this sprite only
                                2. swap the existing variable to use this new variable (this is the dialog box from Turbowarp that I showed above)

                                Would you agree?

                                Mod. Squad TrainerM 1 Reply Last reply
                                0
                                • CreatiCodeI CreatiCode

                                  @mod-squadacademy-1bc96c56

                                  as @Tyller_ pointed out, when you request to change a variable’s scope from shared to “this sprite only”, it is not clear what to do with blocks using this variable in other sprites. Some user might want to delete those blocks, some may want to keep them but using a separate shared variable.

                                  It is much cleaner to do it in a 2-step approach:

                                  1. create a new variable for this sprite only
                                  2. swap the existing variable to use this new variable (this is the dialog box from Turbowarp that I showed above)

                                  Would you agree?

                                  Mod. Squad TrainerM Offline
                                  Mod. Squad TrainerM Offline
                                  Mod. Squad Trainer
                                  wrote on last edited by mod.squadacademy
                                  #16

                                  @info-creaticode No, I don’t entirely agree. There’s a video by griffpatch called The Variable Hack which goes into detail on this subject.

                                  CreatiCodeI 1 Reply Last reply
                                  1
                                  • Mod. Squad TrainerM Mod. Squad Trainer

                                    @info-creaticode No, I don’t entirely agree. There’s a video by griffpatch called The Variable Hack which goes into detail on this subject.

                                    CreatiCodeI Offline
                                    CreatiCodeI Offline
                                    CreatiCode
                                    wrote on last edited by info-creaticode
                                    #17

                                    @mod-squadacademy-1bc96c56 said in Add and option to change variables' belonging:

                                    griffpatch called The Variable Hack

                                    That video is suggesting exactly what I’m suggesting: create a new variable for this sprite itself and then use it to swap out the old shared variable. So which part you are not agreeing?

                                    c0120b92-8c98-47c9-b5c9-b68c6915b533-image.png

                                    Mod. Squad TrainerM 1 Reply Last reply
                                    1
                                    • CreatiCodeI CreatiCode

                                      @mod-squadacademy-1bc96c56 said in Add and option to change variables' belonging:

                                      griffpatch called The Variable Hack

                                      That video is suggesting exactly what I’m suggesting: create a new variable for this sprite itself and then use it to swap out the old shared variable. So which part you are not agreeing?

                                      c0120b92-8c98-47c9-b5c9-b68c6915b533-image.png

                                      Mod. Squad TrainerM Offline
                                      Mod. Squad TrainerM Offline
                                      Mod. Squad Trainer
                                      wrote on last edited by mod.squadacademy
                                      #18

                                      @info-creaticode That is still a handy feature. I personally am not against the feature entirely. I’m just also a fan of the convert to feature (as also mentioned in the video).
                                      f926e1a7-e064-49c6-a6c8-0e0142a325c6-image.png
                                      As for what to do with the blocks in other sprites for the same variable, messages like this appear if you try to convert a variable with blocks in other sprites:
                                      593d2b5e-e55d-4b17-9f8d-b0ce0c38ce96-image.png
                                      What I don’t agree on is that the method of switching variables replaces the method of converting variables. Personally, I think both methods are worth including. Both have their uses. Even better is to add a third way to change this:
                                      873a9792-9a06-4b9b-828a-d33b5439d102-image.png

                                      CreatiCodeI 1 Reply Last reply
                                      0
                                      • Mod. Squad TrainerM Mod. Squad Trainer

                                        @info-creaticode That is still a handy feature. I personally am not against the feature entirely. I’m just also a fan of the convert to feature (as also mentioned in the video).
                                        f926e1a7-e064-49c6-a6c8-0e0142a325c6-image.png
                                        As for what to do with the blocks in other sprites for the same variable, messages like this appear if you try to convert a variable with blocks in other sprites:
                                        593d2b5e-e55d-4b17-9f8d-b0ce0c38ce96-image.png
                                        What I don’t agree on is that the method of switching variables replaces the method of converting variables. Personally, I think both methods are worth including. Both have their uses. Even better is to add a third way to change this:
                                        873a9792-9a06-4b9b-828a-d33b5439d102-image.png

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

                                        @mod-squadacademy-1bc96c56

                                        Thank you for clarifying. We will be supporting add-ons (Scratch version or Turbowarp version), so this feature will be supported when that happens.

                                        JaecadeJnightJ 1 Reply Last reply
                                        1
                                        • CreatiCodeI CreatiCode

                                          @mod-squadacademy-1bc96c56

                                          Thank you for clarifying. We will be supporting add-ons (Scratch version or Turbowarp version), so this feature will be supported when that happens.

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

                                          @info-creaticode I’ve written a Turbowarp extension a while ago, all it does though is just give “pi” as a variable block for 3.14… From what you’re saying, would that hypothetically work with CreatiCode?

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

                                          CreatiCodeI 1 Reply Last reply
                                          0

                                          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