Greetings people!
This is my first post, so I thought I'd make it meaningful. I used the flashlightv3 setup for awhile and was impressed. I decided to rewrite that basic idea, making some tweaks and whatnot, and add in some new features.
Alan Wake got me thinking about making light a resource.
-- Need to find a flashlight pickup, torch, etc before the flashlight works
-- Battery power shown in the corner as a percentage. The percentage drains and does not recharge until you install fresh batteries.
-- The light beam intensity decreases as the battery dies.
-- The battery clicks off when consumed and the light won't work until you find a new battery.
-- Batteries can be installed with the flashlight on or off. There is an on-screen text when the battery is being swapped. If the light is on, it will temporarily click off while the battery is installed.
Also included is a flashlight battery entity. I used the sci-fi battery, scaled down via Entity Workshop, and edited the .fpe file to include the necessary scripts. All you should have to do is put it in the game.
All necessary graphic and audio files are included. The original header from flashlightv3 was inserted in the new script as a tribute. Everything is free to use however you please.
I hope all the right files are included--I think they are! It works pretty good on my test levels and should be a great addition to dark games, especially with the need to find batteries.
*** SETUP:
1. Unzip and drag-drop / cut-paste the Files folder into your FPS Creator directory
2. Create a dynamic light entity anywhere in the level. Name it 'flashlight_source' (very important to spell it right as this entity controls the light and battery operations). Set the light radius to 0. Set the main script to 'scriptbank\user\flashlightm\flashlight.fpi'
3. Create a flashlight object (ww2 or sci-fi torch works well) and set the main script to 'scriptbank\user\flashlightm\flashlight_pickup.fpi'. The flashlight function ('F' key on/off) will not work until you find the flashlight with this script.
4. Put battery entities in the level as desired (should be under Entities\user\flashlight_battery). The script should already be in place, but if it's not (for some odd reason) set the main script to 'scriptbank\user\flashlightm\battery.fpi'
* Once you acquire the flashlight, you can use it normally via the 'F' key. The battery will drain and it won't recharge. Batteries restore 100% power.
* The flashlight and batteries require action use to pick-up.
"We believe whatever we want to believe."
-Demosthenes