Discuss Scratch

Dankiel_
Scratcher
100+ posts

Item in list not deleting

In my game, I have a system where projectiles information is stored in a list ( x, y, clone id) when that clone gets deleted i tell it to delete those items from the list, howvever, it sometimes doesn't work. If you shoot all the ememies then show the list “projectile contents” there are a couple items in the list that should not be there, if anyone could help that would be greatly appreciated!

Project: https://scratch.mit.edu/projects/555271253/

Last edited by Dankiel_ (July 31, 2021 00:20:32)


Making pokemon :O (not done yet)
https://scratch.mit.edu/projects/646516982/
han614698
Scratcher
1000+ posts

Item in list not deleting

Please give more information.

What sprite? What script?

<Scratch Wikian | Forum Helper | 6000+ Posts>

Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why




CompassesHelpMe
Scratcher
61 posts

Item in list not deleting

I looked, and it seemed fine. Did you solve it? If not, do more tests and come back more specific please.

yes
Dankiel_
Scratcher
100+ posts

Item in list not deleting

The sprite is projectiles

The script is the main clone loop
the one that has this script

replace item ( id) of [ porjectile contents] with [x pos]
replace item ( ((id) + (1))) of [ projectile contents] with [y pos]
replace item ( ((id) + (2))) of [ projectile contents] with [id]

The problem occurs when you click fast.

Last edited by Dankiel_ (July 31, 2021 01:34:48)


Making pokemon :O (not done yet)
https://scratch.mit.edu/projects/646516982/
han614698
Scratcher
1000+ posts

Item in list not deleting

I can't seem to find anything wrong there, and yes, I clicked fast.

<Scratch Wikian | Forum Helper | 6000+ Posts>

Credit to -gge for the icons in my signature | I condensed all this code into five lines using [p] tags, idk why




Thingied
Scratcher
1000+ posts

Item in list not deleting

Problem is that the clone is trying to delete something that doesn't exist.

For anyone who is having trouble replicating the glitch, try this script

or just click 10+ cps.

Last edited by Thingied (July 31, 2021 06:08:58)

Powered by DjangoBB