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. Important - code being run as if there multiple copies of the sprites

Important - code being run as if there multiple copies of the sprites

Scheduled Pinned Locked Moved Feedback
17 Posts 3 Posters 2.5k 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.
  • SirBotsS SirBots

    Screenshot (2).png

    Picture for ref

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

    @sirbots

    Can you share the project URL?

    And to clarify, is this the bug: When a new clone is created, more than 1 clone is created?

    SirBotsS 1 Reply Last reply
    0
    • CreatiCodeI CreatiCode

      @sirbots

      Can you share the project URL?

      And to clarify, is this the bug: When a new clone is created, more than 1 clone is created?

      SirBotsS Offline
      SirBotsS Offline
      SirBots
      wrote on last edited by
      #7

      @info-creaticode It’s like the scripts themselves are being cloned. I confirmed that the clones themselves aren’t the problem when I was troubleshooting. It’s when the code is run when there was a previous rainy event.

      I don’t really know the exact cause of what’s causing the code to do this, I only know how to make the code do this and rule out possible causes.

      Your local coder who is working around the clock to make sure great games are made

      SirBotsS CreatiCodeI 2 Replies Last reply
      0
      • SirBotsS SirBots

        @info-creaticode It’s like the scripts themselves are being cloned. I confirmed that the clones themselves aren’t the problem when I was troubleshooting. It’s when the code is run when there was a previous rainy event.

        I don’t really know the exact cause of what’s causing the code to do this, I only know how to make the code do this and rule out possible causes.

        SirBotsS Offline
        SirBotsS Offline
        SirBots
        wrote on last edited by
        #8

        @sirbots Here is the link to the game:

        play.creaticode.com/projects/679b952fe83001fc08dae8bb

        Your local coder who is working around the clock to make sure great games are made

        1 Reply Last reply
        0
        • SirBotsS SirBots

          @info-creaticode

          Hello. I am here to report a bug which is causing massive issues on my World of Conquest game.

          The center of this bug is in the sprite which controls all the audio and visual effects for rainy weather. Here is the code for context: Screenshot (1).png

          The code runs normally when the “start game” command is sent in any weather conditions "weather is used as the variable for the weather effects. It is randomly determined each game if the weather in the previous match was sunny.

          However, the minute that Rain or Cyclone weather occurs in 2 of the total matches in one session, it seems like the scrips are being run as if there is so much copies of it. I’ve done troubleshooting to see if the raindrop clones was doing this, seeing if the layout of the code was causing it, but to no probable results.

          Thus, I concluded this is an editor bug, and there isn’t any way to fix this directly using code in the editor. I’d like this to be fixed as it impedes development.

          NotJaldolfYTN Offline
          NotJaldolfYTN Offline
          NotJaldolfYT
          trusted helpers
          wrote on last edited by
          #9

          @sirbots I think this has been happening to me also, my code for my project when making 1.05-alpha-release was running multiple times. This could be a bug or could be an issue with my device.

          👋

          1 Reply Last reply
          0
          • SirBotsS SirBots

            @info-creaticode It’s like the scripts themselves are being cloned. I confirmed that the clones themselves aren’t the problem when I was troubleshooting. It’s when the code is run when there was a previous rainy event.

            I don’t really know the exact cause of what’s causing the code to do this, I only know how to make the code do this and rule out possible causes.

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

            @sirbots

            Thanks for the link. This is a fairly large project, and it is hard to say if the issue is in the system or in your code.

            As you should already know, when you make a clone, its script is copied, so that’s expected. Are you seeing more than 2 clones when it should only generate 2 clones? For example, if you add a “print” block whenever a new clone is created, do you see many such print logs or just 2?

            SirBotsS 1 Reply Last reply
            0
            • CreatiCodeI CreatiCode

              @sirbots

              Thanks for the link. This is a fairly large project, and it is hard to say if the issue is in the system or in your code.

              As you should already know, when you make a clone, its script is copied, so that’s expected. Are you seeing more than 2 clones when it should only generate 2 clones? For example, if you add a “print” block whenever a new clone is created, do you see many such print logs or just 2?

              SirBotsS Offline
              SirBotsS Offline
              SirBots
              wrote on last edited by SirBots
              #11

              @info-creaticode When clones are made, that clone only runs code under a “When I start as clone” In this case the only such instance is to control the rain effects. everything else is to make the clones and for audio effects, which are not under a “when I start as clone” I had previously shared the code which controls the weather effects for reference. It’s like those scripts are being treated as the aformenteoned when I haven’t written in that way.

              Your local coder who is working around the clock to make sure great games are made

              CreatiCodeI 1 Reply Last reply
              0
              • SirBotsS SirBots

                @info-creaticode When clones are made, that clone only runs code under a “When I start as clone” In this case the only such instance is to control the rain effects. everything else is to make the clones and for audio effects, which are not under a “when I start as clone” I had previously shared the code which controls the weather effects for reference. It’s like those scripts are being treated as the aformenteoned when I haven’t written in that way.

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

                @sirbots

                That’s not entirely true. When you broadcast a message, all clones would respond to that message.

                SirBotsS 1 Reply Last reply
                0
                • CreatiCodeI CreatiCode

                  @sirbots

                  That’s not entirely true. When you broadcast a message, all clones would respond to that message.

                  SirBotsS Offline
                  SirBotsS Offline
                  SirBots
                  wrote on last edited by SirBots
                  #13

                  @info-creaticode How can they respond to that message when clones do nothing unless there is code under a “when I start as clone” block in that same sprite? To back this up, my AI would also be doing the same if that logic was true, thus that would also be broken.

                  Your local coder who is working around the clock to make sure great games are made

                  CreatiCodeI 1 Reply Last reply
                  0
                  • SirBotsS SirBots

                    @info-creaticode How can they respond to that message when clones do nothing unless there is code under a “when I start as clone” block in that same sprite? To back this up, my AI would also be doing the same if that logic was true, thus that would also be broken.

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

                    @sirbots

                    Not sure if we are talking about the same thing. This is an example of clones responding to messages even though there is no code for “when I start as a clone”:

                    196c458f-59a2-4d71-969e-1376789ebf67-image.png

                    It is shared here:
                    play.creaticode.com/projects/68c44068f8e2996ebfb5e1d0

                    SirBotsS 1 Reply Last reply
                    0
                    • CreatiCodeI CreatiCode

                      @sirbots

                      Not sure if we are talking about the same thing. This is an example of clones responding to messages even though there is no code for “when I start as a clone”:

                      196c458f-59a2-4d71-969e-1376789ebf67-image.png

                      It is shared here:
                      play.creaticode.com/projects/68c44068f8e2996ebfb5e1d0

                      SirBotsS Offline
                      SirBotsS Offline
                      SirBots
                      wrote on last edited by
                      #15

                      @info-creaticode No, thats not it. I’m talking about the possibility of the scripts duping themselves. It doesn’t happen the first time, but it does it again on the 2nd instance.

                      Your local coder who is working around the clock to make sure great games are made

                      CreatiCodeI 1 Reply Last reply
                      0
                      • SirBotsS SirBots

                        @info-creaticode No, thats not it. I’m talking about the possibility of the scripts duping themselves. It doesn’t happen the first time, but it does it again on the 2nd instance.

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

                        @sirbots

                        OK. All clones come with a copy of the scripts. It is not clear what you are referring to. Can you make a simple example to illustrate like what I did? Thank you

                        SirBotsS 1 Reply Last reply
                        0
                        • CreatiCodeI CreatiCode

                          @sirbots

                          OK. All clones come with a copy of the scripts. It is not clear what you are referring to. Can you make a simple example to illustrate like what I did? Thank you

                          SirBotsS Offline
                          SirBotsS Offline
                          SirBots
                          wrote on last edited by SirBots
                          #17

                          @info-creaticode It would be rather hard to do so.

                          This is the best I can do.

                          Look at the code I provided for reference at the start and study it.

                          Then, play the game until you get either rainy or cyclonic weather at least twice. On the second attempt, that bug will occur. I can’t really explain it well with words or pictures, its a see it for yourself kinda thing. Once the bug occurs, then it should be more understandable.

                          Your local coder who is working around the clock to make sure great games are made

                          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