Closed fillwithjoy1 closed 1 year ago
@fillwithjoy1 I can make a short tutorial to show you how I make clones in Pygame Zero if you are interested. It's not that hard of a pattern, once you get used to it.
@gotrhythm88 Please, thank you
No problem. Here you go: https://www.loom.com/share/378806b50f1840d9953bc0d83436b7dc
@gotrhythm88 Thank you. So I copied your code and it worked. However my sprite appears behind my screen.fill and therefore unable to be seen w/o removing screen.fill
PS. Can I classify or give clones a special id so they do different things if I created different clones? Plus my clone direction changes accordingly to the player so is there any way of self-destroying the clones?
I'm using list.pop() and .pop(1) however it deletes all the other clones except the first clone created. And the original clone keeps remaining. What to do? @gotrhythm88 Edit: after some experimenting, it seems like .pop deletes 2 clones no matter which implementation I do
Use list.remove
I've migrated from scratch and the thing I love about Scratch is the ability to create clones and code the clones independently so that they automatically delete themselves. I've been trying to search for solutions but couldn't find anything in pgzero that has something close to Scratch's cloning blocks - When I start as a clone, create clone of [x] and delete this clone. So I am opening this issue here