Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 CJY01 · Mar 20, 2020 at 04:35 PM · pickuppick uppick up objectpickups

How to make a note pickup system in Unity2D?

For games where the player can pick up pieces of notes/parchments/etc. (like those in horror games and so on) that can be displayed in another menu, how do I create a similar system in Unity? As in these notes seem to individually hold their own inherent value thereby allowing them to show their own information to the player regardless of the order the player picks them up.

I am trying to make a note pickup system where the player picks up a piece of note on the floor and can view them in another menu. I know how to make the note menu but how do I get it to show a specific page (and subsequent pages) whenever the player picks up a specific note piece? As in rather than displaying an order of notes based on how many notes the player has picked up, the player should be able to specifically view the information of the note piece that he/she picked up.

In summary: How to create a system that allows the player to read the information of Note A (in a menu) when they pick up Note A at Point A, then read Note B's information (in the same menu) when they pick up Note B at Point B. Then in another playthrough, the player picks up Note B first instead but can read Note B's information first, then only gaining access to Note A's information when he/she picks up Note A.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Zentiu · Mar 20, 2020 at 11:47 PM

You could have a collider set to trigger that when a note or whatever enters it destroy the object in scene but first make a copy of it so your inventory or some system adds it to their list of items.

Lets assume the note is a gameObject with a script 'Note' floating somewhere in your game. You walk towards it and collide with it. On your OnTriggerEnter method (assuming of course you have another collider on your player that has a slightly bigger range then your usual collider and set to trigger) you can ask if the object you collided with is a note. if so then add it to your list of notes or an inventory system you set up. Then have a method that is triggered to show the picked up note. Destroy the object you collided with afterwards or before deppending your wish. Your inventory should have a copy of the note and whenever you wish to see if you got something it should show in your inventory. Make sure you make that copy before you remove the note from the world or you will have some weird issues. I suggest to play around with 'OnTriggerEnter' and an inventory system. You can easily make an inventory for it.

For your inventory, make sure you make a script of Inventory that holds a list of items (notes) that is part of your main player. That is how i would do it at least but i assume there might be other systems out there or you could simply write your own.

I hope i was able to help out. If not let me know. Just know that no one is going to code for you unless its an example.

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

124 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Pick up item 1 Answer

Score not increasing as intended? 1 Answer

destroy GameObject without removing reference in list 1 Answer

Problem with collisions of my grab object 1 Answer

how do i make this advance fire system for my player!!! 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