This site requires JavaScript, please enable it in your browser!
Greenfoot back
nooby123
nooby123 wrote ...

2012/12/26

Flashlight?

nooby123 nooby123

2012/12/26

#
I have been pondering about this for a long time. A flashlight! I want to have a Darkness actor that darkens everything else but the direction the main character is pointing. I can't seen to find a way to do it. I want something similar to the flashlight in Builderboy's scenario of Nightmare. I'll accept any form of help!
vonmeth vonmeth

2012/12/26

#
A big black image with a transparent section (will reveal what is under) as an actor, that moves and rotates with the main character. Might be one way.
nooby123 nooby123

2012/12/26

#
I tried, but I don't know how to reveal the underside. I tried to use transparent coloring but that doesn't seem to work either.
danpost danpost

2012/12/26

#
You must clear the image and draw opaque colors only where you do not want it to be transparent. Once a pixel of an image is set with an alpha value, any further 'draw'ing over it will still have that minimum alpha value. I just uploaded a new scenario with a support class that will do what you want. It is called Light Beam Class Demo.
You need to login to post a reply.