Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Item in list not deleting
- 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/
Project: https://scratch.mit.edu/projects/555271253/
Last edited by Dankiel_ (July 31, 2021 00:20:32)
- 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
The problem occurs when you click fast.
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)
- 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.
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)
- Discussion Forums
- » Help with Scripts
- » Item in list not deleting