Help with UFPS and Flashlight/Lantern & Battery system.
Hi,
I’m having a small problem. I use the AdvancePlayer prefab with some changes from UFPS as the Main Player and I’m having an issue setting up a battery/fuel system for a flashlight/lantern. In my build I replaced the mesh and states of one of the weapons that come with UFPS with a lantern and for the most part works great as long as the light is on all the time. I have tried a couple ways already of integrating a battery system but as soon as the battery runs out the game crashes. I can get it to work on a vanilla FPS controller or if I don’t use the weapon system to hold the lantern but I need to be able to use the weapon system. Below is a quick video of the game I’m working on and the lantern I’m working with.
https://www.youtube.com/watch?v=Nu-gPG4IotM&list=PLl5uYuxgMrHCdFUVsP2YddH9c8XYr2tcC∈dex=6
If there is anyone that has UFPS and had successfully integrated a battery with UFPS I will ask you to please share it with me. I don’t expect anything free so if there is a purchase involve just show me the script working (not the code) and if it’s a reasonable prize I’ll purchase it.
I'm really not understanding this, what happens when the battery runs out. Really all that needs to happen is the light you use for the flashlight gets switched off.
UFPS's weapon system stores the weapon as prefabs and when you for example press 1 it renders that weapon. If for example equip the lantern i'm able to use it until the "battery" runs out but as soon as I switch to another weapon the the script breaks because it can't find the prefab. I'm not too sure i'm explain it well because to be hones it's hard to explain unless you have UFPS and see how their weapon system is setup.
I'm going to try to get a video done so I can show how i have it setup in my hierarchy. $$anonymous$$aybe that way it's easier to understand.
Ok so iIfigured it out. I followed the below tutorial and after some $$anonymous$$or changes I was able to do it.
Flashlight and battery system: Part1: https://www.youtube.com/watch?v=gsyEE5TW6-8 Part2: https://www.youtube.com/watch?v=ChwCVraEbso
Your answer
Follow this Question
Related Questions
Flashlight battery 1 Answer
Error : Unknown identifier : FlashLight 1 Answer
How do I make a working flashlight with batteries? 0 Answers
I Need Help Setting Up a Torch Mechanic (Pls Read Desc) 0 Answers