Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Flashlight

  • #1, by LupaShiva 13 years ago Zitieren
    Is there any way to do a Flashlight effect on the mouse, in first person view? For example in the scene only would appear where the mouse is.

    Thank you
  • #2, by SimonS 13 years ago Zitieren
    Complicated way, you could use a half-transparent PNG, set as mouse cursor, that is double times as big as the scene. The image is black, and only the middle is transparent. You can also scale the image up if you're worried about memory.
  • #3, by Nigec 13 years ago Zitieren
    I thought there was a script on here somewhere? might be wrong :/
    but Simon's solution works well, I've used it before but Flash
  • #4, by afrlme 13 years ago Zitieren
    I thought there was a script on here somewhere? might be wrong :/
    but Simon's solution works well, I've used it before but Flash


    I've not seen a script for a flashlight on here anywhere & I don't think it would be possible anyway unless we can draw masks/shapes with lua & define the brightness of the masked area etc. Ideally this would be much simpler to do in a 3D game engine where you have direct control over the lighting & light sources of each scene.

    @Simon: I would call that the simple method... so simple in fact that I would probably never have considered it razz
  • #5, by LupaShiva 13 years ago Zitieren
    Thank you all for the awsners, but is there any possibility that someone exaplin that a little better, im not quite understanding what you mean, sorry and thank you again for the replies.
  • #6, by afrlme 13 years ago Zitieren
    hmm I just tried out Simon's method but it would only let me add an image up to certain size & I couldn't seem to use lua to scale up the cursors either... so er sorry I'm not sure what to suggest for this.
  • #7, by LupaShiva 13 years ago Zitieren
    I actually managed to do it with the simon´s way, was a lot more simple than i thought,i didnt doubled the image size, but increased the minimum to fit the screen and it worked. Thank you all
  • #8, by afrlme 13 years ago Zitieren
    nice one smile

    the minimum?
  • #9, by LupaShiva 13 years ago Zitieren
    LOL actually i did more than double =P for a 1024x768 i did a 2126x1700, but it works perfectly =) Thank you all
  • #10, by Alzas 12 years ago Zitieren
    Hey all, quick question on that topic.

    I created a cursor with a black semitransparent image with a transparent white circle in the middle, giving the effect of the flashlight, as suggested. Everything cool for now. The center of the cursor is of course the center of the circle. Problem is, when the cursor hovers over an object, the action text appears on the far right of the screen. I am guessing this is due to the large image of the cursor. Any ideas as to how to make the action text appear just above the curcor center (just like when we have a normal cursor)?

    Thanks.
  • #11, by Alzas 12 years ago Zitieren
    Any suggestions concerning this issue?