How to drag a clone!

tutorial
clones
tagica

#1

Use this code:


#2

Uhh… You could have just edited your last topic.


#3

And i think this is the right code:
When game starts
Repeat forever
Create a clone
When object is cloned
Repeat forever
Set x (last touch x) y(last touch y)
Sorry if I’m wrong,I’m not completely sure.


#4

Hey @Aariv. You know it’s kinda rude to just correct people without them asking for it, right?


#5

I don’t want to be rude. I’m just what I think might be right


#6

You went to a tutorial, and posted what you think is the “correct” code.

  1. That’s like saying “you are wrong, I can do it better”
  2. Emoji didn’t ask for ſeedback
  3. Did you even check if the tutorial worked before correcting it?

#7

Huh!

There’s something off about this word here heh
@fredricc


#8

Hi @Emoji, thank you for sharing your idea with the community.

I’d like to offer a suggestion. Temporarily, try adding a new text object with this

This will display the total number of objects, including clones, that have been created at any given time. When it’s played, at first it’ll display 2 - since there’s now 2 objects on the stage (the hotdog and the new text).

Now press and drag the hotdog. The number of objects quickly changes to 4096 (the most Hopscotch will allow). There’s nothing “wrong” with this, although it does make the Player run slower (lag).

Why does it do that? It’s because “When {Hotdog} is Pressed, Create a Clone” runs continually when HotDog is Pressed & because all of the clones are doing this. This doubles the number of Hotdogs every few milliseconds (1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096). As you can see it doesn’t take long to create lots of clones.

If you were to change the rule to When Tapped, it’ll only run once. And if you were to change to object reference to Self, only one object will run the code at a time.

I hope this was helpful. Happy coding :grinning:


#9

Nice tutorial! :+1:
I like that you added screenshots so that you can understand better what to do. This is also a really helpful code and useful for those who wants to get started with self variables.


#10

It’s against the rule to give feed back when it hasn’t been asked for?

Let’s not start an argument here?


#11

Thanks! That helped a lot


#12

Great job on this tutorial!


#13

Thanks. I followed you on hopscotch


#14

Thank you so much!! I appreciate it! What is your hopscotch username so I can follow you?


#15

My username is emoji games :star_struck:


#16

ask @smurfy0000000 or @discobot for help. hello @EsspresoPanicDevotee.


#17

Hi! To find out what I can do, say @discobot display help.


#18

@discobot display help


#19

I currently know how to do the following things:

@discobot start new user

Starts one of the following interactive narratives: new user, advanced user.

@discobot roll 2d6

:game_die: 3, 6

@discobot quote

:left_speech_bubble: Carry out a random act of kindness, with no expectation of reward, safe in the knowledge that one day someone might do the same for you — Princess Diana

@discobot fortune

:crystal_ball: You may rely on it


#20

@discobot roll 12d20