Navigation

    CreatiCode Scratch Forum

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

    Shows the Creaticode screen when I place DJ in -- "goofy Tower Defense test room"

    Help
    3
    27
    2639
    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.
    • 白刃の亡霊
      白刃の亡霊 Best Forum Helpers last edited by 白刃の亡霊

      When I place the DJ, there is a hat sprite that is supposed to appear on the DJ, but instead this screen shows

      50221eac-e6cd-49b1-8a4e-34d8daaca3f9-Screenshot 2024-11-13 3.23.21 PM.png

      Please help with this bug and what went wrong,
      Thank you.

      Ghost of the White Blade

      info-creaticode 1 Reply Last reply Reply Quote 0
      • info-creaticode
        CreatiCode @白刃の亡霊 last edited by

        @011830-0a42ef84

        What’s the project URL?

        白刃の亡霊 3 Replies Last reply Reply Quote 0
        • 白刃の亡霊
          白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

          @info-creaticode https://play.creaticode.com/projects/6730fb66bf68856fe9840816

          Ghost of the White Blade

          1 Reply Last reply Reply Quote 0
          • 白刃の亡霊
            白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

            @info-creaticode Nevermind I fixed it

            Ghost of the White Blade

            1 Reply Last reply Reply Quote 0
            • 白刃の亡霊
              白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

              @info-creaticode Can you help me with making the units face the first enemy they see? They target the fastest right now because all I know how to do is target a specific unit, and if they kill that one they target a certain other, and so on and so forth

              Ghost of the White Blade

              info-creaticode 1 Reply Last reply Reply Quote 0
              • info-creaticode
                CreatiCode @白刃の亡霊 last edited by info-creaticode

                @011830-0a42ef84

                Can you define what’s the “first” target? Do you want it to lock at the most front-running target? Or the one with the earliest born time?

                In general, you should not use the “point towards [sprite]” block in this case. Instead, you can try to compare all the targets based on your rule, and find out which target is the one you want to point at, then you can save its x/y positions into 2 variables.

                Then, in the gun sprite, use the point towards x y in N seconds block.

                白刃の亡霊 1 Reply Last reply Reply Quote 0
                • 白刃の亡霊
                  白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                  @info-creaticode I mean the one that is ahead of the other enemies, and if there if one that gets ahead of the one that used to be in front, that enemy will become the “first” enemy

                  Ghost of the White Blade

                  info-creaticode 1 Reply Last reply Reply Quote 0
                  • info-creaticode
                    CreatiCode @白刃の亡霊 last edited by info-creaticode

                    @011830-0a42ef84

                    In that case, you will need to write some code to check which target sprite is currently the first. One way to do it is to look at how far it has traveled. Since every target starts at the same point, the one that has traveled the most should be the leading one, right?

                    And assuming each target has a constant speed, you just need to multiply its speed with how long it has been moving to get its total travel distance. The one target with the longest travel distance must be the leading one.

                    白刃の亡霊 1 Reply Last reply Reply Quote 0
                    • 白刃の亡霊
                      白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                      @info-creaticode So what I’m getting in simple words is, {enemySpeed}*{timeOnField}={totalDistance}, find the enemy with the highest total distance, and point towards that enemy?

                      If so, would you then put to variables labeled {firstX} and {firstY}, and use those as the direction the units need to aim?

                      Ghost of the White Blade

                      info-creaticode 1 Reply Last reply Reply Quote 0
                      • info-creaticode
                        CreatiCode @白刃の亡霊 last edited by

                        @011830-0a42ef84

                        No, you can use

                        point towards (firstX) (firstY) in (0) seconds

                        c12a4556-f78c-4e2a-b3f9-2fcfdf007dc1-image.png

                        白刃の亡霊 1 Reply Last reply Reply Quote 0
                        • 白刃の亡霊
                          白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                          @info-creaticode Will each sprite require their own variables or can you edit them to where {enemySpeed} and {TimeOnField} can affect individual enemies?

                          Ghost of the White Blade

                          info-creaticode 1 Reply Last reply Reply Quote 0
                          • info-creaticode
                            CreatiCode @白刃の亡霊 last edited by

                            @011830-0a42ef84

                            There are many ways to do this. For example, you can use a table or list to store all the speed and start time of all sprites.

                            This might be a good time to ask XO for specific coding suggestions.

                            白刃の亡霊 1 Reply Last reply Reply Quote 1
                            • 白刃の亡霊
                              白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                              @info-creaticode I’ve tried, but it doesn’t appear when I ask it something. I’ve tried debugging and restarting the chat but it doesn’t work

                              Ghost of the White Blade

                              info-creaticode 1 Reply Last reply Reply Quote 1
                              • info-creaticode
                                CreatiCode @白刃の亡霊 last edited by

                                @011830-0a42ef84

                                That’s strange. Are you trying at school? It might be blocked. Can you share a screenshot?

                                白刃の亡霊 1 Reply Last reply Reply Quote 1
                                • 白刃の亡霊
                                  白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                                  @info-creaticode b878a8a0-5f59-45cd-afe9-65a5d840d2d1-image.png
                                  I typed in "how do you make variable on only 1 sprite, and it didn’t show

                                  Ghost of the White Blade

                                  info-creaticode 2 Replies Last reply Reply Quote 1
                                  • info-creaticode
                                    CreatiCode @白刃の亡霊 last edited by

                                    @011830-0a42ef84

                                    Thank you. We will investigate why this is happening.

                                    1 Reply Last reply Reply Quote 1
                                    • info-creaticode
                                      CreatiCode @白刃の亡霊 last edited by

                                      @011830-0a42ef84

                                      This issue has been fixed. You should be able to use XO now.

                                      白刃の亡霊 1 Reply Last reply Reply Quote 1
                                      • 白刃の亡霊
                                        白刃の亡霊 Best Forum Helpers @info-creaticode last edited by 白刃の亡霊

                                        @info-creaticode It still shows the same issue, it might not be fixed because i’m editing the same game I found the bug in, but I’m not sure.

                                        Or it just only occurs to me

                                        Ghost of the White Blade

                                        info-creaticode 1 Reply Last reply Reply Quote 0
                                        • info-creaticode
                                          CreatiCode @白刃の亡霊 last edited by

                                          @011830-0a42ef84

                                          Can you post the project link? Also, have you reloaded the page? It will need a reload to pick up the changes.

                                          白刃の亡霊 1 Reply Last reply Reply Quote 0
                                          • 白刃の亡霊
                                            白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                                            @info-creaticode https://play.creaticode.com/projects/6730fb66bf68856fe9840816

                                            Ghost of the White Blade

                                            info-creaticode 1 Reply Last reply Reply Quote 0
                                            • info-creaticode
                                              CreatiCode @白刃の亡霊 last edited by

                                              @011830-0a42ef84

                                              I get no issue now. Can you reload the browser page and try again? If it is not working, please paste a screenshot again. Thanks

                                              625a5e88-a5cb-49a2-8f1e-64742e249b5c-image.png

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

                                                @info-creaticode
                                                I have problems with XO too on the same project, but only when I see inside.
                                                See Inside:
                                                8ad2a040-d2f2-4269-97af-d8d3c1a75361-image.png
                                                Remix:
                                                87b155a3-ec08-45ab-8850-d206cdea7ab2-image.png

                                                Official Forums Moderator - Resigned.

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

                                                  @catty

                                                  Thank you. We’ll look into this new error.

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

                                                    @catty

                                                    Actually, XO only works when you are logged in. Can you verify you are logged in when you get the error message?

                                                    c. 白刃の亡霊 2 Replies Last reply Reply Quote 0
                                                    • c.
                                                      Cαƚƚყ Mod Helper @info-creaticode last edited by c.

                                                      @info-creaticode
                                                      I was logged in as shown in the screenshots.
                                                      ba668fe6-d593-4b4e-8e9a-8270a2927ee8-image.png
                                                      When I clicked see inside logged out, XO doesn’t pop up.

                                                      Official Forums Moderator - Resigned.

                                                      1 Reply Last reply Reply Quote 0
                                                      • 白刃の亡霊
                                                        白刃の亡霊 Best Forum Helpers @info-creaticode last edited by

                                                        @info-creaticode It also happens every time I load a new project
                                                        e369d3dc-c513-48f9-bfce-45b9aec9e17e-image.png

                                                        Ghost of the White Blade

                                                        info-creaticode 1 Reply Last reply Reply Quote 1
                                                        • info-creaticode
                                                          CreatiCode @白刃の亡霊 last edited by

                                                          @011830-0a42ef84

                                                          Can you please reload the page, and make sure you are logged in, and then try XO again? We have made some improvement to XO, but we are not sure if they would resolve your specific issue. Thanks

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