Navigation

    CreatiCode Scratch Forum

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

    Add and option to change variables' belonging

    Feedback
    6
    28
    904
    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

      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.

      ODST: Orbital Drop Ship Trooper
      (Halo Reference)

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

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

        The_True_Odst mod.squadacademy 2 Replies Last reply Reply Quote 0
        • The_True_Odst
          The True ODST Best Forum Helpers @Tyller_ last edited by

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

          ODST: Orbital Drop Ship Trooper
          (Halo Reference)

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

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

            The_True_Odst 1 Reply Last reply Reply Quote 0
            • The_True_Odst
              The True ODST Best Forum Helpers @Tyller_ last edited by

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

              ODST: Orbital Drop Ship Trooper
              (Halo Reference)

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

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

                The_True_Odst 1 Reply Last reply Reply Quote 0
                • The_True_Odst
                  The True ODST Best Forum Helpers @Tyller_ last edited by The_True_Odst

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

                  ODST: Orbital Drop Ship Trooper
                  (Halo Reference)

                  1 Reply Last reply Reply Quote 0
                  • mod.squadacademy
                    Mod. Squad Trainer @Tyller_ last edited by

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

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

                      @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

                      The_True_Odst mod.squadacademy 2 Replies Last reply Reply Quote 0
                      • The_True_Odst
                        The True ODST Best Forum Helpers @info-creaticode last edited by

                        @info-creaticode How do you get to that?

                        ODST: Orbital Drop Ship Trooper
                        (Halo Reference)

                        c. info-creaticode 2 Replies Last reply Reply Quote 0
                        • c.
                          Cαƚƚყ Mod Helper @The_True_Odst last edited by

                          @011830-0a42ef84
                          “Developer tools:”?

                          Official Forums Moderator

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

                            @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

                            The_True_Odst 1 Reply Last reply Reply Quote 1
                            • The_True_Odst
                              The True ODST Best Forum Helpers @info-creaticode last edited by

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

                              ODST: Orbital Drop Ship Trooper
                              (Halo Reference)

                              1 Reply Last reply Reply Quote 1
                              • mod.squadacademy
                                Mod. Squad Trainer @info-creaticode last edited by

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

                                info-creaticode 1 Reply Last reply Reply Quote 1
                                • info-creaticode
                                  CreatiCode @mod.squadacademy last edited by info-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.squadacademy 1 Reply Last reply Reply Quote 0
                                  • mod.squadacademy
                                    Mod. Squad Trainer @info-creaticode last edited by mod.squadacademy

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

                                    info-creaticode 1 Reply Last reply Reply Quote 1
                                    • info-creaticode
                                      CreatiCode @mod.squadacademy last edited by info-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.squadacademy 1 Reply Last reply Reply Quote 1
                                      • mod.squadacademy
                                        Mod. Squad Trainer @info-creaticode last edited by mod.squadacademy

                                        @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

                                        info-creaticode 1 Reply Last reply Reply Quote 0
                                        • info-creaticode
                                          CreatiCode @mod.squadacademy last edited by

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

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

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

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

                                              @jeffreyrb03-gmail

                                              We are still doing research on that.

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

                                                @info-creaticode Got it. My extension is at https://github.com/Jeffreymaniac/Turbowarp-Extensions and it’s pretty simple. I’m not sure if it still works though because I made it in like 2021

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

                                                mod.squadacademy 1 Reply Last reply Reply Quote 0
                                                • mod.squadacademy
                                                  Mod. Squad Trainer @jeffreyrb03-gmail last edited by

                                                  @jeffreyrb03-gmail Your extension seems to still work. Do you often make Turbowarp extensions, or just had a go at it once or twice?

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

                                                    @mod-squadacademy-1bc96c56 I havent made one since 2022. I just know JavaScript and its different forms by studying them, like for scratch extensions and nodeJS

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

                                                    mod.squadacademy 1 Reply Last reply Reply Quote 0
                                                    • mod.squadacademy
                                                      Mod. Squad Trainer @jeffreyrb03-gmail last edited by

                                                      @jeffreyrb03-gmail Okay, cool. Well, if you ever make more, please let us know!

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

                                                        @mod-squadacademy-1bc96c56 Sure, also, I don’t plan on making any as I don’t use turbowarp anymore, but if you want I can make an extension for you. Just tell me what blocks you want and what functionality you want and I can probably get it done.

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

                                                        mod.squadacademy 1 Reply Last reply Reply Quote 0
                                                        • mod.squadacademy
                                                          Mod. Squad Trainer @jeffreyrb03-gmail last edited by

                                                          @jeffreyrb03-gmail We’ll let you know if we think of something. We teach kids how to use not only Scratch, but advanced Scratch Techniques and Mods of Scratch, such as Turbowarp, Gandi IDE, Penguinmod…etc.
                                                          On our website is a list of mods (CreatiCode isn’t on there yet. We may add it at some point). and their respective extension galleries. We get excited when we find a new orignial Scratch mod, extension, or extension gallery - hence why we asked.

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

                                                            @mod-squadacademy-1bc96c56 Ok! I appreciate the offer and I’m gonna start making turbowarp mods again.

                                                            #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
                                                            • First post
                                                              Last post