What I want to do is free the oldest slime slice once the slugs slime trail reaches about 20 slices... This is what I've tried so far, but it does not seem to work:
Code:
if (slice is valid (slime) && count >= 20) then(
free slice (first child (slime))
count := 0
)
count := count + 1
free slice (first child (slime))
count := 0
)
count := count + 1
I have a counter in a while loop to count whether the amount of slimes is exceeded. Unfortunately I can't figure out how to properly free the oldest slime slice. I'm assuming what I currently have doesn't work because the "first child" is deleted once, but cannot be deleted the next time around. Or perhaps I'm just using the wrong function. Hopefully someone can shine some light on this.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
⍠ C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases



