Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
0
Question by HellWalkergame · Sep 05, 2013 at 03:20 PM · inventory systemitem

Create usable item with Brackeys inventory

Hey guys! I'm trying to make a survival game and i'm with some difficult to set up my inventory. Since i'm new to scripting i'm using Brackeys inventory system (found on the asstes store: https://www.assetstore.unity3d.com/#/content/10384 and i can't make a usable item, like a can of food to regenerate my health.

I know i need to put something like

if (healthfod == used) { health += 20; }

Or something like that, but my biggest problem is to setup everything with the system. Because i need to check if it's a food, drink, antibiotic, etc.. and call the specific function for each item to affect my player.

As i said before, i'm new to scripting and also in the community, i've been looking for a answer here for a week and couldn't find it.

If anyone can help me or give me some tutorials on how to do it, that will be awesome =D Thanks guys

Comment
Add comment · Show 2
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 Therian13 · Nov 30, 2013 at 07:04 AM 0
Share

did you ever figure it out? Ive been trying to get it to work all week as well.... Brackeys really needs to make that video explaining how to do it like he promised, ins$$anonymous$$d of starting a new series on a 2D game...

avatar image Therian13 · Dec 14, 2013 at 04:53 AM 0
Share

if you still need to help with this, I got it to work. (assu$$anonymous$$g you are following brackey's tutorials as well.)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by cansit · May 28, 2014 at 06:45 PM

Create a enum of itemtype hpPotion, manaPotion in Item.js then, go to ItemEffect.js, get the item.js component and, in the line of the effect check if (enum from item.js = hpPotion) hp += 20 if (enum from item.js = manaPotion) mana + 20 and so on...

Comment
Add comment · Share
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

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

17 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Inventory AddItem help 1 Answer

Deleting item from inventory system... 1 Answer

How to combine items in inventory with words 0 Answers

Unable to usem item from inventory 1 Answer


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