Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Brighten part of the scene  (Read 3409 times)

0 Members and 1 Guest are viewing this topic.

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Brighten part of the scene
« on: February 23, 2013, 05:04:50 PM »

Hello everybody

I plan to have a scene which will be completely dark when the character enters. Then, when the character finds a pack of matches and lights one, I wish to have an effect where a circle area around the character is brighter than the completely dark scene. The character will be able to walk around the scene therefore brightening parts of the scene. The match effect will stop after a few seconds when the match goes out.

I assume that this is not a trivial requirement. Has someone tried this before, is there a workaround? My game is full 2D.

Thank you
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Brighten part of the scene
« Reply #1 on: February 23, 2013, 05:44:53 PM »

There is this flashlight script. The light follows the cursor but you can easily change that to character position (check Update() function call in flashlight.script as it says in the instructions).
Logged
fl*p

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Brighten part of the scene
« Reply #2 on: February 23, 2013, 07:26:23 PM »

Thanks a lot odnorf that was exactly what I wanted. And thanks Mnemonic for the script.
Logged
 

Page created in 0.019 seconds with 20 queries.