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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by MarvinH · Jan 06, 2015 at 08:06 PM · inventorylistsitemitems

*What are some ways of implementing a Mid Mission Weapons/Upgrade/Equipment store?

What are some ways of implementing a Mid Mission Weapons/Upgrade/Equipment store?

TLDR If I want to create a 'shop' system where the player's weapon changes based on what he bought/equipped, should I use a full inventory system or can this be done with an array?

Hello. I realize this is a multipart question. I will try to make it as specific as possible but general enough to hopefully help others. I have been searching through forums, did tutorials, read guides, and I feel like I'm close, but not quite 100% on a solution to this problem.

I am trying to create a game that has a play, earn, spend feedback loop (See Luftrausers, Knightmare Tower, Jetpack Joyride etc)

The main idea is that the player earns money during a round, but when he dies, he can use the money to upgrade his ship. To test, I am only doing the main weapon, but I wold like to expand into other equipment types.

I have done the excellent Inventory Tutorial by Awfulmedia Found Here: https://www.youtube.com/watch?v=f4Op-UdvdK0

The tutorial creates lists of items, which are custom datatypes that contain attributes like what the item id, an item icon, name etc. This becomes the player's inventory. Items are added using the Add method.

I have one class for the player's item, and a similar class for the shop's item. What I would like to do is have two different lists, one for the player and one for the store. When the player clicks an icon in the store, that item would be removed from the store's inventory, and be added to the player's inventory List<>.

What do I need to do to get both Lists to talk to each other? My initial thought is to call the player's inventory list in both scripts. Will this cause a problem?

Alternatively, If I'm only allowing the player to change his weapon, could I just do an array that houses the 'current weapon' that the player has equipped?

Apologies if this is still vague, let me know if anything needs clarification

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

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

2 People are following this question.

avatar image avatar image

Related Questions

Filling in an inventory list. 1 Answer

How i can make a script-made button interactable? 0 Answers

PLEASE HELP! How can I add the material component from this scriptable object to a public list? My goal is to allow the player to apply materials to game objects from that list. 0 Answers

How do I retrieve an item from a list? 1 Answer

Decorator pattern for inventory item class 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