Hi, it's me again. I don't understand why the "pix" function isn't working, I programmed it so when the white pixel (in the purple monster) touches the red line it disappears. What do you think is going on?
I misread your post actually, I thought you just wanted to show the white pixel on top of the red line, but what you want is to destroy the enemy when it touches the red line, right? If it is the case I do not recommend the use of drawing functions like pix to check this type of collisions but rather implement a function that checks for line and rectangle intersections.
Because of this post I tried to make a simple cart example of how to check this type of intersections, if you're interested you can check it here:
https://tic80.com/play?cart=2073