13 Replies Latest reply on Aug 25, 2010 9:33 PM by kglad

    Flashlight effect


      Okay. Basically, I need a flashlight effect on my game, kind of like wherever your mouse goes, it looks like you are holding a flashlight there and it can reveal hidden things.


      I used a tutorial on how to do it, and it worked O.K... Basically my primary objective was there would be text and it would be masked until the cursor passed over it and you could see. It didn't work at first but when I changed it from input text to static text it worked... sort of.


      It only worked for the first thing I put there. If I put 7 different text boxes, it would only reveal the first.


      Here is the video: http://www.youtube.com/watch?v=6UCbQojCkwE


      If you don't want to watch the video, it basically says to create 3 layers, the top layer being an action layer, the second layer being where you mask stuff, the 3rd layer being where the flashlight is put.


      Action layer = Put code to make flashlight follow cursor

      Mask layer = Put stuff that you don't want visible until flashlight is over it

      Flashlight layer = Put the flashlight in this layer


      And you right click the 2nd layer, and check "Mask" and it should work


      But I still have the problem that it only works for the first text box...


      If any of you guys could help me figure out why it only works that way, or supply me with an alternative way to replicate a flashlight effect, please do