Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 BazooClem · Nov 09, 2015 at 05:15 PM · guigameobjectcharactercontroller

Create an easy craft system

Hello,

I would like to add a simple craft system (3 Wood = House) in my multiplayer game, have you a script or a idea how i can collect wood and craft a house (I have already a house prefab) in my game? I'm french, sorry for the grammar mistakes =).

Thank you.

BazooClem

Comment
Add comment · Show 1
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 OctoMan · Nov 09, 2015 at 05:46 PM 0
Share

2D or 3D? Easy crafting? At first try to collect stuff, and drop stuff, i made a vid tutorial about such stuff in 3d for some kind of survival game. Nothing fancing but a point to start.

https://www.youtube.com/watch?v=BLH34k8mSSY

Once you have that you can fiddle around with crafting.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Statement · Nov 09, 2015 at 06:24 PM

Create a crafting system similar to the solution to this question.

Then you can define stuff like:

 // Set up crafting rules (1 House = 3 Wood)
 database
     .Create("House")
     .Require("Wood", 3);
 
 // populate inventory (Start with 3 Wood)
 inventory.SetAmount("Wood", 3);
 
 // Craft House. Inventory will now contain 1 House and 0 Wood. (added House, removed Wood)
 database.Craft("House", inventory);

The classes has functions to see what you can craft based on your inventory. After you've created the House, you can remove it from your inventory and spawn the house.

Comment
Add comment · Show 1 · 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 Statement · Nov 09, 2015 at 06:28 PM 0
Share

The name "database" may be a little misleading. It's not a database like SQL etc. It's just a bunch of recepies. It could just as well be called recepies to make it clearer but I chose to stick with my example na$$anonymous$$g for consistency in this answer.

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

52 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

Related Questions

Question on Textbox Margin and Size limitations,Scaling margin on text box 0 Answers

2D Character Falling Through Ground 0 Answers

Problems with positioning GUI rectangle and GameObject 0 Answers

How do I make a compass? 0 Answers

Transform search function only sporadically works?! 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