How to drag a clone!

Use this code:

13 Likes

Uhh… You could have just edited your last topic.

2 Likes

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.

2 Likes

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

10 Likes

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

2 Likes

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 Likes

Huh!

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

5 Likes

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:

11 Likes

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.

4 Likes

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

Let’s not start an argument here?

2 Likes

Thanks! That helped a lot

3 Likes

Great job on this tutorial!

2 Likes

Thanks. I followed you on hopscotch

3 Likes

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

2 Likes

My username is emoji games :star_struck:

3 Likes

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

1 Like

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

@discobot display help

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

@discobot roll 12d20