Scratch Clones and Local Variables Tutorial

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 177

  • @SurfingScratcher
    @SurfingScratcher  4 года назад +24

    SCRATCHY QUESTION: What is one reason why you might use local variables with clones?

    • @kastmepoiss135
      @kastmepoiss135 4 года назад +10

      i'm creating a project where you need to detect clones by the actions, imma use that localID for in-script detection

    • @tonypatino1765
      @tonypatino1765 4 года назад +2

      For commonly used variables like "i" ;D

    • @richardlow2947
      @richardlow2947 4 года назад

      I am trying to make electric field arrows do different things (depending on their distance and direction from charges)

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      @Spectral Penguin Check out my video on health bars: ruclips.net/video/fm9QJ9yk1jw/видео.html
      You should be able to use a local variable for the 'life' of each enemy. You could also clone the healthbar and peg it to the position of your clones, but you'll probs need to store xy locations in a list to help you out. A big task, but doable!

    • @joshuachan6317
      @joshuachan6317 4 года назад

      For making the multiple enemy as a clone with its local variable store as it’s health. So your tutorial really helps me out a lot! Thx bro

  • @CatsAreAwesome146
    @CatsAreAwesome146 6 месяцев назад +1

    Yo thanks! This tutorial didn't just teach me how to do a specific thing it actually made me understand the concept. I never knew that local variables actually did that for clones as, and the fact that you explained the fact that it will say 1,2,4,8 and stopped that pitfall was a huge help. Using this tutorial I was able to make something almost entirely different than the showcased example, and thats a testament to how good a job it does teaching fundamentals!

  • @chetanys6920
    @chetanys6920 3 года назад +7

    i was making a space shooting game and the clone of the laser i had made had a variable named health and wanted to decrease the number of the variable when the clone of the laser touched that sprite and this helped me a lot in that game, thanks for the video.

  • @influxxmedia
    @influxxmedia 3 года назад +5

    FANTASTIC! Exactly the answer I was looking for. I'm creating a bubble particle system, where a bubble sprite is cloned, then each clone floats up at random speed until they reach a certain point when they pop. At this point I wanted to delete the clone and reset, having a new clone respawn and begin its cycle again. Each time the respawned clone ended up duplicating all 15 bubbles in the system. Agh. This global/local var technique will help me fix that. Awesome, thanks! Hope you caught that wave. Cheers dude.

  • @mrg4melover
    @mrg4melover 4 года назад +5

    I’m working on an Undertale-inspired game with blasters (multiple may be on screen at once, so the blasters themselves had to be clones). I used a local variable to determine whether the clone was the blaster (shooter) or the blast (bullet, to some extent??), and depending on what the variable is, it behaves either like a blaster or a blast. This video really helped me, thanks!

  • @kingvax064
    @kingvax064 2 года назад +3

    I have been stuck with a problem for a while. Can you make a sprite go towards the closest clone of another sprite?

    • @SurfingScratcher
      @SurfingScratcher  2 года назад +2

      Yeah you should be able to. The trick is to keep track of all the clones using local variables. You'll have to loop through all the clones and get the x and y coordinates and check to see which is the closest to the sprite you're interested in.

    • @kingvax064
      @kingvax064 2 года назад +1

      @@SurfingScratcher Thank you very much! I ended up just making three different sprites instead of clones of the same one, but I'll use this technique if I want to expand the project.

  • @turttheturtle9874
    @turttheturtle9874 Месяц назад

    Thank you so much, I needed a tutorial on how to detect which clone was being clicked, and this helped a lot!

  • @ShineOrSomething
    @ShineOrSomething 4 года назад +2

    my game goes smoothly and the bullet works fine but when you play for like a minute the bullet and my enemy stops making clones suddenly, do you know how to fix this? pls help

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +2

      Hmm check that your clones aren't making clones. Scratch has a limit of around 300 clones, so you could have maxed out. That bug is demonstrated and fixed in the video. How can you check this? Count the number of clones you have on the screen and use the 'say' block to print its id number. They should match.

    • @ShineOrSomething
      @ShineOrSomething 4 года назад +1

      @@SurfingScratcher neva mine sorry i just forgot to use the "delete this clone" block and it kept on maxing out because i didnt delete any clones. Thx

  • @oualidbazzaoui1989
    @oualidbazzaoui1989 2 года назад +1

    tysm, i was making a card game and this helped me so much mostly specific clones!

  • @nguyenquangdung9892
    @nguyenquangdung9892 3 года назад +4

    Nah, this awesome channel surely deserves more views, likes, shares & subs. Unfortunately I dont have any friends who are into Scratch and the programming stuffs like me :'(

  • @tyguy104
    @tyguy104 Год назад +1

    Essential for trying to build a city maker or simulator game. Where when you place houses down and I want to program the sim going to his job with a car. So the houses are clones. And I figured out, how the list will record a spawn. It can record the clone's x and y positions and you can make it wait for 10 seconds until it does record the value if you need a lot of time. Then i'll try to make the car clone come out of that x and y position that was recorded for the house clone's x and y coordinate. Ultimately trying to get to an industry's or commercial's x and y. All the properties are either R, C or I (or just 3 different) types of clones. How Sim City would divide it's zones.

  • @dockpirate2127
    @dockpirate2127 4 года назад +5

    omg I'm so stupid, I've been trying to find a way to make a clone visible while the original sprite still stays hidden thank u so much

  • @mxstermajoraktas4454
    @mxstermajoraktas4454 4 года назад +3

    the video helps me for a game thx

  • @timsuperovsky
    @timsuperovsky 2 года назад

    Thank you wery much, for a MONTHS ive been thinking how to give clones names. And now i know how.

  • @crazyseth4099
    @crazyseth4099 3 года назад +1

    how do you hide the sprite but show the clones?

  • @GuiDuckz
    @GuiDuckz 4 года назад +4

    I have a question thats gonna really help me out
    I wanna do a sprite that points to the closest clone.

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      Great question! You'll need to track the x and y positions of clones in a list so that you can check to see which is the closest.
      You're not gonna be able to point in the direction of that clone using a built-in block. Instead, you'll need to use trigonometry based on the x and y coordinate that you've got from your list.
      Thankfully, I've just done a whole series on trig. Check out this video, it'll give you some clues: ruclips.net/video/kxRywPEUfcc/видео.html

    • @masak1gang419
      @masak1gang419 3 года назад

      @@SurfingScratcher That's really hard but. I JUST SPENT 4 WHOLE DAYS TO FIND THAT ANSWER. MASSIVE THANKS!!!!!

  • @notrhythm
    @notrhythm Год назад

    6:35 im late to the party, but when you fire a bullet, the other existing bullets also create a clone of their own as you have the event to create a clone on the sprite itself.

  • @bcs2971
    @bcs2971 11 месяцев назад

    Thank you so much! I had a problem where the clone button cloned all of them. So glad to understand why and understand how to overcome that problem.

  • @kelvinmontage9001
    @kelvinmontage9001 Месяц назад

    Hi, I got a question, how did u make the gun move along the turret body when pointing towards the mouse pointer ? my gun seems to move weird

  • @ajtopia
    @ajtopia 2 года назад

    AHHH ITS SO SIMPLE AS TO JUST MAKING IT FOR THAT SPRITE ONLY!!!!! THANK YOU SMMM

  • @nasdfigol
    @nasdfigol 4 года назад

    7:00 you can also do
    When green flag clicked
    {; forever
    If
    Create clone of (myself)
    ;}

    • @nasdfigol
      @nasdfigol 4 года назад

      The issue is you can trigger it without the green flag

    • @nasdfigol
      @nasdfigol 4 года назад

      It also makes the isClone variable obsolete, because green flag is for original sprite but space key applied to both original and clones

    • @nasdfigol
      @nasdfigol 4 года назад

      Also I subbed

  • @madamebunbun3479
    @madamebunbun3479 6 месяцев назад

    Thanks, I've been making a silly game on scratch and got stuck with cloning issues

  • @SunsetDragon
    @SunsetDragon 3 года назад +1

    Thank you so much for this video!! It helped a lot, and wasn't one of those six-hundred-million-hour-long tutorials you see all the time! Ha!
    This helped A LOT with my Paranoid Animation Meme, which I'm still working on as of now, but I'm done with the intro!
    In the intro I had to have FOUR CLONES all doing different things. I always wondered how to do this!! This is going to help a LOT with so many other things, such as animations with a limit of one sprite, and even more animation and code memes!
    Thank you again!
    ~Sunset

    • @SurfingScratcher
      @SurfingScratcher  3 года назад +1

      Awesome, thanks for sharing your experience Sunset. Loved reading it :)

    • @SunsetDragon
      @SunsetDragon 3 года назад

      @@SurfingScratcher Thank you for the tutorial! :D

  • @arachnophobia-e5y
    @arachnophobia-e5y Год назад

    thanks man, you saved me, im making an ANT simulation but i didnt know how to refere to a specific ant of the colonyK

  • @phearedphantom
    @phearedphantom 7 месяцев назад

    I was having trouble that the isClone? Fixed. Tbh I do not understand how that fixes my problem but thanks a ton. I tried (here and there) for hours to figure out the solution for my tycoon and it was here the whole time

  • @damrus312
    @damrus312 3 года назад

    can you help me please. why bulletld (for this sprite only) not show when (set bulletld to globalld). thank you

  • @breadisyummy_
    @breadisyummy_ 2 года назад

    im making an evolution simulator, but i cant figure out how to make the animal go towards the closest food clone

  • @wendizhoumdphd4627
    @wendizhoumdphd4627 4 года назад +3

    Great content. Please keep it up.

  • @dockpirate2127
    @dockpirate2127 4 года назад +1

    Thank you so much! I just found out how to make a path generator with this :)

  • @leofeld9511
    @leofeld9511 3 года назад

    I am making a paddle and ball game like scratch tutorial. I want to make another ball appear once the score reaches a certain number. Can I do this with clones? Or would I need to create another sprite?

  • @dragondg6412
    @dragondg6412 3 года назад

    How do i make clone point to other clone if they are enough close to each other

  • @NamHoang-oy7lj
    @NamHoang-oy7lj 2 года назад

    How can you make the clone not overlapping on each other?

  • @tdog_
    @tdog_ 2 года назад

    this is helping my water physics engine thank you so much!

  • @trishstr
    @trishstr Год назад

    is there a way for clones, to have clones for themselves ?
    like a clone all to themselves with their own properties

  • @childofflesh1591
    @childofflesh1591 2 года назад

    Hi, I’m working on a game where I want to be able to create clones that are sort of magnetic and move towards each other. Can you help with how the code to make clones move towards each other might work?

  • @Emerald_D.Jael4
    @Emerald_D.Jael4 Год назад

    hello, i would like to make clones with differents script and differents costumes in one sprite. How can i do that plz ?

  • @DeadliestBlox
    @DeadliestBlox 2 года назад

    I'm trying to make a button where it hides everything by using a broadcast, but I don't know how to hide the clones, can anyone help me? I can't find answers in this video.

  • @Bryan-dc7pb
    @Bryan-dc7pb 4 года назад +1

    maybe i be late but i wanna know if clones can interac with other clones (from other sprites)

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +4

      Hi Bryan, thanks for your question. Short answer is yes. All the sensing blocks are still available (if touching other sprite). If you want to detet a specific sprite, that's where you'll need to check with IDs.
      If you broadcast an event, then every clone will receive it. If you want a specific clone to receive it, again, you'll need to use the ID method that's covered int he video.
      Let me now if that clears it up, or if it's something else you're wanting to do.

  • @twalton
    @twalton 2 года назад

    This helped me SO MUCH. Thank you!

  • @안태성-c3u
    @안태성-c3u 2 года назад

    It's very helpful for me to develop my first scratch project. Thank you for your video.

  • @victoriabart8322
    @victoriabart8322 4 месяца назад

    Can anyone help me please? I did the exact same thing he did but mine spins weird. It doesn't follow the arrow key properly and I'm not sure what to do.

  • @davidliu2243
    @davidliu2243 3 года назад

    I need to replace objectives in lists with the local variable of clones but it doesn't seem to work. Why is this?

  • @shaileshkarnawat1983
    @shaileshkarnawat1983 4 года назад +1

    I all unable to make that man pls help the bullets attend visible, they aren't moving... Pls help

  • @celsladroma8048
    @celsladroma8048 Год назад

    I HAVE VERY IMPORTANT QUESTION WHY I CANNOT DELETE ONE OF MY CLONE IN SCRATCH because I can delete entire colony of clone if I use delete? Even you see all the help didn't seems know the answers... why?

  • @michaelklein6244
    @michaelklein6244 3 года назад

    Really cool, this enhances my understanding and shows me how little I know. Amazing stuff!!!

    • @SurfingScratcher
      @SurfingScratcher  3 года назад

      Good on you for checking it out and expanding what you know:)

  • @WUJCIX
    @WUJCIX Год назад

    THank You so much you very helped me

  • @Goldtalysis
    @Goldtalysis 3 года назад

    hello! i know im really late, but i have a problem and idk how to fix it. so, i have been creating a fnf game in scratch, and im actually coding the notes, now, here is where the problem begins, i use clones and messages for the notes (e.x : send (left)) and when the left note recieves left, then it will show as a clone and it will move up, however, if i create too much clones, they just dont appear, they wont. i tried restarting scratch, remaking the game from 0, everything. it still happens, can you please help me? i got so excited to start with this game, and go so sad when i saw this problem.

    • @SurfingScratcher
      @SurfingScratcher  3 года назад

      Scratch has a 300 clone limit, so you won't be able to generate more clones if you've reached that limit. You'll need to delete clones before creating new ones. See if that helps your problem!

    • @Goldtalysis
      @Goldtalysis 3 года назад

      @@SurfingScratcher thanks! I will try that later

  • @tjwthedj1355
    @tjwthedj1355 2 года назад

    How do I make the turret to do that

  • @theverybest4184
    @theverybest4184 3 года назад

    thank you so much this helped me a lot

  • @OhioStudiosOG
    @OhioStudiosOG 2 года назад

    Nice, but the script broke after a while and the bullets wouldnt stop existing after hitting the wall, but only a enemy i made it hit. What should i do?

    • @SurfingScratcher
      @SurfingScratcher  2 года назад

      You'll want to sense if touching the wall and then delete the clone once it's true.

    • @OhioStudiosOG
      @OhioStudiosOG 2 года назад

      @@SurfingScratcher Thanks

  • @Jellyjam14blas
    @Jellyjam14blas 4 года назад +3

    Thank you! I been trying to figure out how to do this for so long. ❤️

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      Boom jellyjam14blas! Thanks for dropping your comment. I'm pumped to hear you found value in the video. Keep your code on 😎

  • @R0DBS
    @R0DBS 10 месяцев назад

    Thanks mate!

  • @Mutatedordinary
    @Mutatedordinary 4 года назад +1

    Really diggin’ that t-shirt, it is a really creative design!

  • @justnick7779
    @justnick7779 3 года назад

    Why when I am making a clone, his script isn't working only if I click on it

  • @mayorhotdog2799
    @mayorhotdog2799 4 года назад

    Great video, it really helped me out with my script, thank you.

  • @SmartWittyName
    @SmartWittyName 4 года назад

    How would you then transfer the value of the local variable back to a new global one? For example, when you click on a specific bullet, a new variable is assigned the number of that bullet? When I try to do this by "set (variable) to bulletid" it doesn't choose a clone, it assigns 0, just as bulletid is listed at the top of your screen.

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      Hi SmartWittyName, thanks for your comment. In the video, we use a globalID, change it by 1, then make it the value of the localID. If you want to go the reverse, then just set the other global variable to the value of bulletID in the sprite clicked hat block. You've just gotta be sure that you've already set bulletID. Read the value of bulletID first and be sure that it's not already 0, if it is, you have a bug somewhere!

    • @SmartWittyName
      @SmartWittyName 4 года назад

      @@SurfingScratcher Thanks so much for replying! I found the bug - I had a different trigger for cloning in the script of another sprite, originally to prevent myself from cloning clones. After rearranging some things to use the isClone variable you showed in the video, it worked perfectly =)

  • @fidelisalberto6226
    @fidelisalberto6226 4 года назад +1

    Seus vídeos são excelentes..OBRIGADOOO

  • @bananaman5238
    @bananaman5238 4 года назад

    Is it possible to find the x,y position of a clone with another sprites clone and have the other sprites clone go to the clone

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      Hi skruffles, my head's in a bit of a twist reading that. I'm going to rephrase to see if I'm understanding you.
      Sprite A (clone) wants to read the x,y position of Sprite B's (clone). You want Sprite A's (clone) to go to Sprite B's (clone)?
      You can store the x and y positions of clones in a list. If you use the 'id' approach that's in the video, then the item number of the list can refer to the 'id'.
      So if you have a list called xPositions, then item 1 would be the x position of the clone with id = 1.
      I'm curious to know what trigger (event/user interaction) prompts the Sprite A's (clone) to go to the xy of the Sprite B's (clone).
      Because if you know the target position based on a user event, you can capture those in variables. This approach acts like a bridge between the two.
      Good luck!

    • @bananaman5238
      @bananaman5238 4 года назад

      @@SurfingScratcher yup you got it and this helps me alot, thanks!

  • @Piokoxer
    @Piokoxer Год назад

    a little question: let's say i detect a collision with a clone, how do i get its ID?
    it's the last thing i need to finish up my ball physics engine (and just now i realised Griffpathc made a vid on it... whatever, doing it myself is more fun)

    • @SurfingScratcher
      @SurfingScratcher  Год назад

      It's been a while since I made this. I'm guessing that I would try and read the local variable's value in the place where I'm detecting the collision.
      When you start as a clone, you're probably detecting some collisions there. You could 'wait until you collide with object and read its value then. Just some ideas.

    • @Piokoxer
      @Piokoxer Год назад

      @@SurfingScratcher i ended up writing my own collision system with lists of every clone's x pos, y pos, x vel, y vel, and radius. It works!
      God is vector math a pain in the ass when you only have the components
      And you're a 13 year old working with vectors for the first time

    • @SurfingScratcher
      @SurfingScratcher  Год назад +1

      @@Piokoxer I think you're epic! Great work on solving your own problem :)

  • @ShinnySilver
    @ShinnySilver 5 месяцев назад

    How can I delete a specific clone?

  • @larryc324
    @larryc324 3 года назад

    Very helpful

  • @dashady1367
    @dashady1367 3 года назад

    Do you know how to hide clones on a certain backdrop? Then show them on another

    • @SurfingScratcher
      @SurfingScratcher  3 года назад

      Should be doable. You'll just need to create a local variable for the clone that tells it which backdrop to follow or not to follow.
      Then when you switch backdrops, broadcast an event and get the sprite of the clone to check if its local variable is equal to that of the current backdrop.

  • @aguy1844
    @aguy1844 7 месяцев назад

    I didn't realize local variables are also local to clones. I've been encoding information in costume number and direction😢.

  • @arctico3o891
    @arctico3o891 4 года назад

    I have a question for you because you seem like you know a lot about scratch. How could I make it so that my clone goes to a randomized piece of a(for example) 12 by 12 grid? I will send a link to the game in the reply section of this comment. Please respond in the comments of the game.

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      HI arcticwolf, you could probably just use some maths to help you out with this one. You'll have 12 x positions for each row. You'll have 12 y positions as well. The coordinates are just combinations of these.
      If each piece has an id, then you can locate its x and y position. The first 12 pieces will have id's from 1-12.
      Say you want id = 6. Well that's just going to be 6 x width of piece. All the y positions in the row will be different. You can also use the mod operator to figure this out. 6 mod 12 = 6, for the next row, 18 mod 12 = 6. Check out my video on Scratch operators including mod if that's confusing.
      For the y positions, you can just divide the id by 12 and round it to the floor or ceiling depending on how you like to do it. For example, 13/12 = 1.08. If you ceil that, it rounds it up to 2. Then you can just multiply the height of the piece by the result of the division. It will work for each row of you grid.
      Here's a project that creates a grid based on mods: scratch.mit.edu/projects/332495324
      Okay, so now that you can calculate x,y coords based on an id, you should be able to send the clone of another sprite to that location.

  • @ppcat8630
    @ppcat8630 3 года назад

    how 2 create a specific amount of clones?

    • @ppcat8630
      @ppcat8630 3 года назад

      like if i wanna create 3 clones, i just wanna create 3 clones

    • @SurfingScratcher
      @SurfingScratcher  3 года назад

      @@ppcat8630 put ' create a clone' in a repeat 3 times block. Do it on a green flag press.

  • @shashibhushan4445
    @shashibhushan4445 4 года назад +2

    Is there a way I can make clones act like sprites?
    Also, you make awesome informative videos.

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      Hi Shashi, thanks for your comment and question :) A clone is a sprite - it's a clone of a sprite. It 'inherits' all the behaviour that you've coded for the sprite you've cloned. The way to control it (like a sprite) is to use a 'When I start as a clone' hat block. That's the sprite way of saying (hey the green flag has been clicked, come into existence and do your thing).

  • @pancakepete7809
    @pancakepete7809 2 года назад

    omg thankyou, my shooter is playable

  • @diegofranco5847
    @diegofranco5847 Месяц назад

    THAAAAAAAAAAAAAAAAAAAAAAAAAAAAANKS BRO

  • @gavinmann4152
    @gavinmann4152 4 года назад +1

    Thanks soooo much. i was using just a bulletID which was global, so you can only use that variable at the INSTANT the clone is created, but with this i can use the local variable for the clone later on in the script and not have it interfere with the other clones. Maybe i'll link the project when i'm done if that's ok - it's simulating an ecosystem.
    Your videos are the best - they are clear and they are so professional looking, Happy Scratching!! :)

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      Awesome, Gavin! So pumped to hear that you found some value in the video and thanks for the supportive feedback :)

  • @Ac3ofspad3s-cp6wp
    @Ac3ofspad3s-cp6wp Год назад

    HELLO WORLD I am super late to this amazing video... I was making a battle cats not really a knockoff on scratch when I thought how to make clones die one at a time? thanks for the video helped me a lot

  • @kenadelglass7933
    @kenadelglass7933 4 года назад

    Great videos. Been teaching Scratch since 2015 and learned a thing or two from you. Thank you for sharing. Can you make two or more cloned ball sprites that are moving and bouncing bounce off each other? I can do this when they are the same color using touching color but what if they are different colors?

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      Hi Ken, thanks for dropping by with your comment. Pumped that you've found some value in the video!
      Here are two ideas that come to mind for me:
      You could probably wrap the color sensing blocks in the "OR" boolean blocks as a starting point. Though, that wouldn't account for a random color.
      A more advanced solution would be to track the x,y positions of the clones using a list. Then you would calculate the distance between the center's of each ball. If the distance is less than the radius of the ball, then you would have a collision. This solution would have some performance issues if you had lots of balls.

  • @neitine1
    @neitine1 2 года назад

    It was that easy and i just tried to make something with lists

  • @vtcomics365
    @vtcomics365 Год назад

    you are so cool!!

  • @FlameAndSlime
    @FlameAndSlime 4 года назад +1

    What are the differences between global and local variables? How do they work together? And what would happen if 'bulletID' was set to 'For all sprites'? Would it make any difference?

    • @SurfingScratcher
      @SurfingScratcher  4 года назад +1

      Yep, it would make a difference. That exact situation is explained in the video. 'globalID' is essentially the 'bulletID' that has been set to 'For all sprites'. It means that all clones will share this one value. No clone will have its own copy of it.
      When set to 'this sprite only' a clone will get its own copy of the variable. If the clone changes the value of the variable it only changes for that clone's copy, not any of the other clones.
      For all sprites = same value for every clone
      This sprite only = each clone has its own copy

  • @JoshCartman
    @JoshCartman 4 года назад

    Hey I'm trying to use Scratch clones for a Lives indicator. I read something about Clone IDs but I'm not getting it. Can you help me? I got as far as generating the Clones on the screen but I don't know what to do next.

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      If you wanted to create lives for each clone, then you would have a variable FOR THIS SPRITE ONLY called something like lives. Then, use a 'When I start as a clone' hat block to continually check if the clone should lose a life.
      Something like, if bullet touches clone then change lives by -1

  • @batuhankoyuncuoglu2311
    @batuhankoyuncuoglu2311 4 года назад

    Thank you very much :)

  • @TheDummbess30543
    @TheDummbess30543 2 месяца назад

    scratch is not only for childrens is also for older peoples

  • @geogames8206
    @geogames8206 2 года назад

    Mine makes more than 1 clone for some reason

  • @VillagerJack
    @VillagerJack 4 года назад

    my clones all teleport to the gun when i press space

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      Hi Jack, thanks for sharing. I suspect that you may have a go to position of gun in the space key press hat block. You will want to position the clone in the 'when I start as a clone' hat block.If you do it in the space key press, then it will apply to every clone and not the one that is created.

    • @VillagerJack
      @VillagerJack 4 года назад

      @@SurfingScratcher thank you

  • @leopaveley
    @leopaveley 4 года назад

    Hey! I've been working in Scratch and come across a really nasty problem. So basically, is there any way I can read a specific clone's coordinates/direction. Say, one that touches the player. This would truly help me a lot and you seem experienced. :)

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      Hi T and S Productions, thanks for your question. The 'id' system that's covered in the video can solve this issue. In fact, if you put your code inside the 'when I start as a clone' block and read the x and y reporter blocks it will report. You could use lists to make them global. Something like this:
      .
      .
      You'll need to assign a local variable called 'id'
      You'll need to create a list called x-coords
      You'll need to create a list called y-coords
      .
      .
      In the 'when I start as a clone' hat block, put a 'repeat until' block. Repeat until touching the player. Inside the repeat until, you could set the x-coords at the item location of the id and set its current x value. Do the same for y. Remember, this is only if you want them globally. I might make a video on this if it's confusing as I think it will help a number of people. But see how you go :) Good luck!

    • @leopaveley
      @leopaveley 4 года назад

      @@SurfingScratcher With your advice, I managed to make it work! Thank you so much :)

    • @SurfingScratcher
      @SurfingScratcher  4 года назад

      @@leopaveley Unreal banana peel!

  • @밥먹어밥-n6h
    @밥먹어밥-n6h 4 года назад

    Um first sorry for bad English
    -Im using duplicate block to make bullets but if i shoot many bullets(duplicate many times), bullets stop duplicating.
    Im using scratch2 and am i have to use 3?-
    Sorry! Never mind me! I found that i didint put delete duplicate box lol thx!

    • @ShineOrSomething
      @ShineOrSomething 4 года назад +1

      i have the same problem but i don't know what a delete duplicate box is, can you pls tell me? :)

  • @Chillz011
    @Chillz011 3 месяца назад

    I want clones that spawn in clones

  • @Pepsi_inc
    @Pepsi_inc 2 года назад

    eu entendi 85% vou ver de novo pra entender 100%😅😅😅😅

  • @ultimate3000
    @ultimate3000 2 года назад

    didn't work, now i cant even fire once.

  • @austino7770
    @austino7770 3 года назад

    I'm gonna make a game out of this. Also, this comment is the 100th comment!

  • @zgreatest69
    @zgreatest69 4 года назад

    WOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @-absoulute_machine-
    @-absoulute_machine- Год назад

    i understood none of that

    • @SurfingScratcher
      @SurfingScratcher  Год назад +1

      Watch it again!

    • @SurfingScratcher
      @SurfingScratcher  Год назад +1

      I'm learning Combine from Apple at the moment and I need to rewatch content sometimes to help build my understanding.

  • @Tashipelmo
    @Tashipelmo 3 месяца назад

    ཨའི ཕུན ཚོ ཚོ པ རི ཤོ

  • @jbarrettSRQ
    @jbarrettSRQ 2 года назад

    great to have a clone tutorial. But please don't make them of weapons. Please make it gender neutral and peaceful. thank you

    • @SurfingScratcher
      @SurfingScratcher  2 года назад

      Thanks for the feedback and it's useful to consider going forward. If you were to remake this clones tutorial, what themes/props would you use in its place?

  • @Legac706
    @Legac706 Год назад

    dude just put when space clicked create clone of myself wait until not key space pressed