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. Have clones point to other clones

Have clones point to other clones

Scheduled Pinned Locked Moved Feedback
10 Posts 3 Posters 2.4k 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 Offline
    SirBotsS Offline
    SirBots
    wrote on last edited by
    #1

    This would be useful for ai clones to attack other ai clones directly.

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

    CreatiCodeI 1 Reply Last reply
    0
    • SirBotsS SirBots

      This would be useful for ai clones to attack other ai clones directly.

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

      @sirbots

      Maybe you can use a table to store positions of all clones, and then you can use the “point towards x y” block to turn a sprite towards any of those positions?

      SirBotsS 1 Reply Last reply
      0
      • CreatiCodeI CreatiCode

        @sirbots

        Maybe you can use a table to store positions of all clones, and then you can use the “point towards x y” block to turn a sprite towards any of those positions?

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

        @info-creaticode The fact that the clones are bots, and there is multiple bots (clones) on both teams, I am afraid that it might lag because the table is updating so frequently. Even if I make a sprite for a detection zone to limit how far each bot can track each other, I doubt that will mitigate it should lag ever occur.

        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 The fact that the clones are bots, and there is multiple bots (clones) on both teams, I am afraid that it might lag because the table is updating so frequently. Even if I make a sprite for a detection zone to limit how far each bot can track each other, I doubt that will mitigate it should lag ever occur.

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

          @sirbots

          Sure, a new dedicated block would be more efficient. How about a new motion block like this?

          point towards sprite [SPRITENAME] with clone ID [ID]

          CreatiCodeI 1 Reply Last reply
          1
          • CreatiCodeI CreatiCode

            @sirbots

            Sure, a new dedicated block would be more efficient. How about a new motion block like this?

            point towards sprite [SPRITENAME] with clone ID [ID]

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

            @SirBots

            Note that most likely you will still need to know each enemy clone’s position and decide which of your clone will target which enemy clone based on positioning and power. You don’t want to hardcode which of your clone target which enemy clone, right?

            SirBotsS 1 Reply Last reply
            0
            • CreatiCodeI CreatiCode

              @SirBots

              Note that most likely you will still need to know each enemy clone’s position and decide which of your clone will target which enemy clone based on positioning and power. You don’t want to hardcode which of your clone target which enemy clone, right?

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

              @info-creaticode I want it where they will target the closest clone within a set distance of itself.

              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 I want it where they will target the closest clone within a set distance of itself.

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

                @sirbots

                What if there is no clone within the distance limit? What if multiple of your clones will target the same enemy clone?

                This is becoming very specific to your game, so it is not suitable for a new block, which is meant to be much more generic.

                SirBotsS 1 Reply Last reply
                0
                • CreatiCodeI CreatiCode

                  @sirbots

                  What if there is no clone within the distance limit? What if multiple of your clones will target the same enemy clone?

                  This is becoming very specific to your game, so it is not suitable for a new block, which is meant to be much more generic.

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

                  @info-creaticode For now, the ai is set to where they just fire in random directions In front of themselves. The enemy ai does the same, but targets the player if the player is close enough to them. I just published the first version of the game, so you can go check it out.

                  For your question: They would just shoot in random directions and occasionally move.

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

                  CreatiCodeI Tyller_T 2 Replies Last reply
                  0
                  • SirBotsS SirBots

                    @info-creaticode For now, the ai is set to where they just fire in random directions In front of themselves. The enemy ai does the same, but targets the player if the player is close enough to them. I just published the first version of the game, so you can go check it out.

                    For your question: They would just shoot in random directions and occasionally move.

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

                    @sirbots

                    Thanks for sharing. It will be an interesting challenge to remix your game and add smarter logic for the clones based on enemy clone positions. Let’s see if there are any volunteers…

                    1 Reply Last reply
                    0
                    • SirBotsS SirBots

                      @info-creaticode For now, the ai is set to where they just fire in random directions In front of themselves. The enemy ai does the same, but targets the player if the player is close enough to them. I just published the first version of the game, so you can go check it out.

                      For your question: They would just shoot in random directions and occasionally move.

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

                      @sirbots I can try, and updating to a table I believe does slightly lag, I have a project that I recreated here that uses this method, I have recreated it in 3 different places as a sort of benchmark (code.org, here, nad codeacademy) and I’m pretty sure I got decent fps at like 30 clones on creaticode, I’m fairly certain that 10-15 was no problem, though I can try to find the project (the project does have similar logic to this, checks distance from every other clone, then checks some values per clone to decide what to do)

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

                      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