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 user-10287 (google) · Mar 23, 2011 at 07:19 AM · how-to

mining in the game

how can i make it so that you can mine something in game and then have a certain number of that material but i only want it to show in one screen that you can bring up by pressing a button example: hydrogen----- 32 units oxygen------- 99 units element 0---- 12 units methane ----- 58 units etc etc i want it so that you can only mine it in a certain spot thanks

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 Arnout Swint · Mar 23, 2011 at 08:34 AM 0
Share

i don't get it... can you give me a better explenation?

avatar image Justin Warner · Mar 23, 2011 at 06:26 PM 0
Share

Psudeo from what I can get from it... If player pushed __ key, show GUI. OnGUI has all the stuff that is needed. If player pushes key, disable the GUI... shouldn't be to hard.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Jason B · Mar 23, 2011 at 06:33 PM

I would really recommend reading the scripting reference in the manual and learning one of the languages Unity uses. The reason I say this is that what you're asking for is as simple as adding to integers and displaying GUI boxes, which is very basic and covered in full (and then some) right in the manual. Since I don't believe you've read the manual, I at least ask you do that before asking others to do the work for you. No offense intended. I'll help you with where to look, though:

Search OnGUI in scripting reference for creating the interface.

For what you asked, you need to learn about strings and integers (and general programming).

You didn't say what language you're trying to use (I'm guessing you don't know yet) or what sort of game you're trying to make, so I don't know what to say about the mining thing. How you go about it will differ on whether you're making an isometric, 3rd person, 1st person, etc. type of game. For a first-person game you might make it based on where you click, for a third person game it might be based on a raycast.

Hopefully you understand why I point you in the right direction rather than writing a script for you; too many people come here asking for script after script, and then they get frustrated later because they can't write scripts themselves, and they subsequently lose interest or feel helpless and quit game making forever.

I'd recommend programming in C# since Microsoft has a very good program with great autocomplete to help you learn quickly (Microsoft Visual Studio C# 2010). Plus I'm pretty sure the majority of our helpers here program in C#, so you'll more quickly get an answer you're looking for (and won't have to translate to a different language).

Comment
Add comment · Show 2 · 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 user-10287 (google) · Mar 25, 2011 at 04:56 AM 0
Share

ok thanks where is this manual that you speak of??

avatar image Aldwoni_legacy · Jun 07, 2011 at 01:25 PM 0
Share

Scripting Reference: http://unity3d.com/support/documentation/ScriptReference/index.html

$$anonymous$$anual: http://unity3d.com/support/documentation/Components/index.html

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

1 Person is following this question.

avatar image

Related Questions

How to make a drivable car in unity3d with scripts 2 Answers

How do I make a round minimap? 2 Answers

How to Activate Random GameObjects? (C#) 1 Answer

Engine Belt 2 Answers

Has anyone used MeshChartFree? 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