Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by kenny1007 · Jun 08, 2016 at 02:46 PM · flashlightbatterytorch

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.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mmmpies · Jun 08, 2016 at 03:05 PM 0
Share

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.

avatar image kenny1007 Mmmpies · Jun 08, 2016 at 08:07 PM 0
Share

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.

avatar image kenny1007 Mmmpies · Jun 09, 2016 at 12:45 PM 1
Share

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

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

58 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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

Spotlight Flashlight Cut Off When Near Object? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges