Bug, or incorrect code (please come to topic if your a clone pixelartist)


#21

Hi Dolphy :smiley: (can I call you that? If not, it's okay and sorry!) Sure, I think I was a bit confused about the description before so let's take a look!


#22

Ok! (Can I just quickly publish and unpublished and give the link?) @t1_hopscotch


#23

@t1_hopscotch
https://c.gethopscotch.com/p/yr2o5t6pb


#24

Okay sure :slight_smile:


#25

Also you can call me Dolphy :wink: unfortunately somebody famous has the nickname Dolphy XD


#26

Hehe okay :slight_smile: and I am looking through the project :smiley: So it looks like that white gap is not supposed to be there?


#27

Yeeaaahhhh I've tried different positions and colour and the gap is still there


#28

Oh, or that it is in the wrong spot? :thinking:


#29

Yeah it's not meant to be there, I don't know why it has occured


#30

I can see you've definitely tried a lot of things, particularly with the timing & Waits!

Ah okay, I thought it was because the gap was meant to be there but had ended up in the wrong position:

^because of the Forward ability. But the result was different to the code anyway.

I tried switching around the order of the Yellow code:


to make sure The Colour is set before the clone is created.

And it improved the position of the gap, but still it was in the wrong place which was suggesting something was still up (even if we didn't want a gap in the first place too)

So then I looked again at the Object is Cloned rule. Timing can be a little unexpected with clones just because we don't know when blocks will run exactly after another one.

Just to be safe, I tend to move anything that uses variables – that are likely to change soon – to near the top of the Object is Cloned rule. So that the current value of the variable can be used before it changes... i think I'm explaining it in a confusing way, but here's a screenshot:

In short, I moved the code that had The Colour further up in the rule, than the Set Size which doesn't use the variable, because The Colour might change to another value soon.

Then it turned out as expected from the code (which was good :thumbsup:) Now as for the gap, I think it's due to the Forward ability from earlier.


#31

Because I'm really lazy could you maybe publish and unpublish that and I will save as draft??


#32

Hehe sure! my explanation was too long... :joy:


#33

No it was quite fine, it's just I'm to lazy XD (I will give you credit)


#34

Oh wait, I remembered... I wasn't able to save it as a draft for some reason so I had edited it but it didn't save. The changes were minor so let me make a list:

  • switch the order of Create a Clone and Set The Colour in the Yellow ability
  • Move the Set Size block in the When object is cloned rule to the bottom

Oh, and as for the gap, it is related to the Forward ability in the last pixel line


#35

Ok thanks!!! :DDD


#36

What do you mean??


#37

Oh, that was the Create a Clone of this character block in the Yellow ability, like in this picture from above:


#38

Sorry, umm well what do you mean with forward?.


#39

Oh, the gap was due to this block, I think:


#40

Unfortunately I don't think it's that as I added that forward when trying to fix it :confused: