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 /
  • Help Room /
avatar image
0
Question by Gimbitmen · Jun 27, 2017 at 01:52 PM · dooramount

A Script that will open doors with an amount of coin

Hi I'm making a low poly game and I would want to know how would I make it as in each level there is amount of coins or jewels to open a door and there's a number count on top. So like you need 100 coins or jewels to open this door to go on to the next level. What would I need or how would I create that script or if someone could create It I will credit you ty byeeee

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 nathanlink169 · Jun 27, 2017 at 10:22 PM

Just a note, that people won't be able to provide a full script with that little amount of detail:

  • Are you using Unity2D or Unity3D?

  • How are you storing your money?

  • Do you have a door script already?

Providing as much detail as possible will help us answer your questions.

Comment
Add comment · Show 3 · 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
avatar image Gimbitmen · Jun 28, 2017 at 01:47 AM 0
Share

Unity 3D And Idk you could store money and I don't have a door script... >~<

avatar image nathanlink169 Gimbitmen · Jun 28, 2017 at 03:05 AM 0
Share

You will need to put some work in yourself - from what I can tell you're a beginner, and that's okay! We all started somewhere, myself included. That's what these forums are for.

I'll attach a partially created currency script below. What I recommend is following the tutorial found here, and your challenge is to finish the script that I'm attaching here. By the time you get there, you should be able to finish more advanced tutorials and learn how to create a door script.

 using UnityEngine;
 
 public class $$anonymous$$oney : $$anonymous$$onoBehaviour
 {
     // Called on creation of the object
     void Start()
     {
         m_Current$$anonymous$$oney = 0.0f;
     }
     
     // Called every frame
     void Update()
     {
         // Empty
     }
 
     public void Add$$anonymous$$oney(float in_moneyToAdd)
     {
         // TODO: Add in_moneyToAdd to m_Current$$anonymous$$oney
     }
 
     public void Remove$$anonymous$$oney(float in_moneyToRemove)
     {
         // TODO: Remove in_moneyToRemove from m_Current$$anonymous$$oney
     }
 
     public float Get$$anonymous$$oney()
     {
         // TODO: Return m_Current$$anonymous$$oney
     }
 
     private float m_Current$$anonymous$$oney;
 }

avatar image Gimbitmen nathanlink169 · Jun 28, 2017 at 07:28 AM 0
Share

Thank and I will watch the video thank you again :)

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

109 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

Related Questions

Opening door script in C# 3 Answers

Using Multiple Activated Triggers to trigger a Separate Event. 0 Answers

How to open and close a door 0 Answers

Need help with this code? thanks. 2 Answers

How to specifically arrange only 'Mesh Collider' to be hit by Raycast? 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