Discuss Scratch

captaingrumpy
New to Scratch
3 posts

Glitch when deleting clones....

My browser / operating system: Windows NT 10.0, Chrome 90.0.4430.212, No Flash version detected

Hi All,
I am having a problem with deleting clones in a simple single-player ‘Pong’ based game I have written.
The player has to bounce a ball with their paddle in order to bounce the ball off bricks to earn points.
Once hit the block is supposed to disappear with the game continuing until all the bricks are gone.

The bricks are generated as clones at the initialisation phase of the game. The problem comes when
the ball hits one of the bricks. The system deletes ALL of the clones instead of just the one brick that was hit.
I am using the ‘Delete this clone’ control block in the ‘Block’ sprite script with the script called by a broadcast
message ('Block Hit') from the ‘Ball’ sprite.

I have tried different browsers with no luck and inserting some debug code to monitor the activity of the delete
block script has shown that the ‘Block’ clone delete script loops repeatedly and deletes every block with the first
call to the delete script. Basically the one delete clone script is looping 10 times (in this case) with the first
call.

I suspect that if I haven't made a mistake that there is a glitch in the Scratch runtime environment.

I would appreciate a more experienced person's assistance if possible so it can be escalated to the Scratch team
as necessary.

Thanks in advance.
Lightthefox
Scratcher
13 posts

Glitch when deleting clones....

you have to put it in the “WHen i start as clone” part

Hi its me light
scratch :: hat variables
imagine :: sensing
program :: sound
share :: control
captaingrumpy
New to Scratch
3 posts

Glitch when deleting clones....

Hi Lightthefox,
Sorry you need to be a little more specific. Put what into the “When I start as a clone” part?
Chiroyce
Scratcher
1000+ posts

Glitch when deleting clones....

Hi captaingrumpy,

Can you provide a link to the project? That would greatly help us to identify your problem

Thanks,
Chiroyce







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
epicboi17
Scratcher
100+ posts

Glitch when deleting clones....

if you use a broadcast, the broadcast sends whatever is being broadcasted to ALL clones. in order to do just 1,

basically, insert delete code into when start as clone. hopefully i explained clearly (i ahve to put here since i dont use forums often and im new to this block forum thing)

when I start as a clone
forever
if <touching [ Ball] ?> then
delete this clone
end
end

Last edited by epicboi17 (May 22, 2021 12:59:30)


i never follow discussions if it isnt mine so if you responded to me go to my profile if you want i guess
captaingrumpy
New to Scratch
3 posts

Glitch when deleting clones....

Hi epicboi17,

Thanks for that. I was clueless until you told me that broadcasts hit all clones simultaneously..
I have now got it working.

You're a champ!

Captain Grumpy (at your service)

Last edited by captaingrumpy (May 26, 2021 04:57:05)

Powered by DjangoBB