It was my first exposure to the surface object. I like it so when i was bored today. I decided to play around with it.
I switched it's settings to multiple images. And wrote a fastloop to scan the second image for blue. Using the blue as a key to reference exactly where to draw transparent into the terrain.
Once you click it cuts a little dinosaur into the rock.
My problem is I'm getting one little pixel artifact in the tail. Any ideas as to what's going on?
You'd need to give us a lot more to go on...
Having said that, by far the easiest way to achieve the effect you're going for, would be to "blit" a separate dinosaur active onto the surface. Just give the dinosaur and the surface different transparent colors, so that the actual color of the dinosaur is the same as the transparent color of the surface. The catch is that it wouldn't work with alpha channel transparency...
Your right about that sketchy. "blit" is for sure the intended and best to do this.
I'm mainly experimenting and participating with fastloops and the surface object. And pixel by pixel scanning, i feel is a useful skill. Comes in handy if you had more things for the computer to decide. Example sourcing a giving color under a action point, and using that color to decide if damage is allowed. Or special Armour or ability exist.
In my example i used set image. The scanned image isn't seen only because the image is set back before the end of the frame. I know set image is meant to be used to make sprites out of the surface object. But i was seeing if it could be used for other stuff too. I still can't figure out how to use the "set editing image"
But i might play around with it some more. I think it would be useful for their to be another example out their. That people could learn from. That built on top of the original surface object example.