TBSr's General Hopscotch Coding Topic


The fixed project is published: Here

Let me know when you've saved it, and I'll unpublish.


Thank you very much, @ThinBuffalo. The lag is a lot better now.


Glad to hear it!

Keep in mind that until THT fixes the root cause, the project will continue to get larger each time you open it eventually causing the lag to come back. But the project can be cleaned again if necessary.

Any suggestions for changes?


Thought you might like this:

I saw that you were able to create a specific number of clones, but wanted to work out for myself how to do it without studying your method. After finishing, I compared our projects.

Turns out that at a high level the mechanic is similar to your project, but the implementation is simplified (less variables and less When events).

Edit: I just found that you posted a tutorial. The code in the tutorial is simpler than the project of yours that I found. I've less variables and events, but I think I like differences in your method better as it's formulas are simpler than mine :laughing:


That is a good method, though it is a little complicated. Since I posted that tutorial, I've realized that it can be done with very little code. If you want to know how, you can look at any of my recent projects that involve clones, or I can just update the tutorial.


@Valgo Wow. I did over complicate it :smile: I thought my formulas were elegant, but this based on your way is much simpler (and easier to remember). Thanks


@valgo @CreationsOfaNoob @t1_hopscotch @Rawrbear

Does anyone know of a way for multiple objects to "advertise" or "reply with" one of their self properties in response to an event, such that a secondary event could be triggered, conditionally, based on the replies without sequentially indexing each object?

I know the question is likely confusing, perhaps I should ask it this way:

Does anyone know of a way for multiple objects to all "see" the values of a given self property of the other objects, such that the value of any object could trigger a conditional event in any of the other objects without sequentially indexing each object?

Perhaps a simple example would help.

Let's say you have a "clicker" type project with numerous text objects that all track the number of times they've been tapped with a (self) property. Without having to loop through each object sequentially using an index property is there a way to code a behavior where after any object is tapped, any object that has a number of clicks equal to any other object sets itself to a new, random color. I'm not trying to make a clicker project, but that's the simplest example I could quickly come up with.

I can accomplish the concept by sequentially (using an index property) having each object set a global (iPad) variable to it's self property of interest, while all objects have a conditional event based on the iPad property. But this creates significant lag for a large number of objects. So I'm trying to see if there's a way to do this without having to sequentially loop through each object (and I should say, without having to hard-code references to the specific objects)

Does this make any sense?


Hey @ThinBuffalo , a while back I created a simple remake of your clone bumps clone project but I turned it into a challenge. Tell me if you like it. https://c.gethopscotch.com/p/yickikv81


I may or may not be able to do this. I'm thinking that if I can, it will be hard to do. I'll try, though.

Note: I am at school as of the time I am typing this, so I can't try right now.


Yes, I do like it (in the "to be please by" sense) and I did like it (in the expression of the Hopsotch :heart:️ Icon sense) :laughing: Sorry, it's been a long day/week... What I especially enjoyed about your project is that you took the time to dig into the code and make significant changes! Most people who remix my projects don't bother to do that. :clap::+1:


Hi, ThinBuffalo.

Have you noticed that projects on featured have been messing up. This consists of deleting, duplicating and changing order. Recently, I emailed The Hopscotch Team about this and I received a valid reply saying that the "featured project order" is listed in the same numbers. Every project on featured is assigned to a certain ordering number but many many projects had the same number!

Here was a screenshot of THT's code on the computer:

Interesting, eh? Weird weird computers...

Unfeatured Project

Really interesting! Thanks for sharing.


Wow your projects are amazing @ThinBuffalo do you know any other computer languages?


Hey @BlastFusion. Yeah, weird. Is that a screen shot from THT or something you captured? I assume it's suggesting that any projects further down than 46 may not display "correctly".

Actually... that may explain something I've noticed. Occasionally I'll get a burst of likes on my featured projects, then nothing for a while, then another burst of likes, then nothing again. It's not a concern, but I found it curious. Inconsistent indexing of the featured projects would explain it though :thinking:


Something about your facial recognition (@BlastFusion) reminds me of...FoodDelivery?


Hi @Dolphin_coders. Thank you :smile: I'm glad you like my projects!

I've used quite a few different languages over the years. But right now I mostly use VB.net, VBA, and Hopscotch. I find that different languages really aren't too difficult once you learn a few core concepts & learn to consistently think logically (like a computer would). Specific syntaxes can be difficult to remember, but are usually easy to look up.

Do you use any other languages besides Hopscotch?


I will be learning different languages over the summer. Then, after high school, I'll go to a Technical Institute for my college years. If I'm lucky, Ill be able to work at Google Headquarters. If you don't know what Google headquarters is, look up a video on Google that shows off the amazing workplace.


Ooh (I think you are explaining it nicely but I don't think I get everything hehe)

I don't think this was what you were looking for but when I first thought for clones,

When object is cloned
    Repeat Forever
        Check if Self[] etc
            // do something or broadcast to a global variable

but I see you are looking for objects in general and not just the clones of one, so this isn't helpful for that.

I read over it again a few times then I feel I understood more :relaxed: (so yes it does very much make sense :slight_smile:) sort of basically, you want other objects to be able to respond when a specific Self value of some other object changes (?)

that is a very interesting thing to think about. Do you think you could explain more about how you're doing it at the moment? :blush: — so is it one Self variable of some objects that you are keeping track of, and you have an iPad variable for each of those? I was going to suggest that it sounds like 'broadcasting' in Scratch, or 'flagging' in general but I'm not quite sure ^_^

Clones and Self Variables [Tutorial] (Posts 1-2)

Hi @t1_hopscotch. Thanks for your interest. I think you understood right.

You know for When events there are 3 categories of events: iPad, Collisions, & Conditionals.

Collisions accept object references, whereas Conditionals accept variable references. A major distinction is that, with clones, the object references can apply to multiple objects.

Basically I'm trying to make a Conditional when event that behaves more like the Collision / object references where the conditional event works for multiple objects.

What I've done so far is

  • give each object a unique (self) Index
  • use an (iPad) Flag, Counter, & Broadcast_Value
  • of course, each object also has some (self) Value that all objects need to compare with the (self) Value of all of the other objects

When I want to compare the values,

  • the Flag is set
  • when the Flag is set, one object iterates through each Index using the iPad Counter
  • Each object has a Conditional event comparing it's (self) Index to the Counter, & setting it's (self) Value to the (iPad) Broadcast_Value in turn.
  • Each object has a Conditional event as a function of the Broadcast_Value & it's (self) Value, taking the desired action when triggered

This works fine, but takes too long if there are numerous objects to enumerate


thank you for explaining it, hmm I dont have any better ideas :thinking: