Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity SURVIVAL, FIREPLACE, CUTTING DOWN TREES and BUILDING SYSTEM

Discussion in 'Editor & General Support' started by TomKamin, Oct 22, 2014.

  1. TomKamin

    TomKamin

    Joined:
    Sep 16, 2014
    Posts:
    8
    Hi, i need help with my game, where you are surviving in cold storm in snowy environment.
    Im begineer, so please dont forgot that...
    1) I need to have a building system like in game called Unturned, if its possible. I really like that system. I want to give player chance to build his own house as well as fireplace that will heat you...
    2) I need a fireplace, that you can build from some items, that will heat you, or you will die over time...
    3) I use free BRACKEYS Inventory system, and i have a cola bottle, that when you pick up and click on it, will make you less thirty(i have system for HEALTH,HUNGER and THIRST) When i click on the item in inventory, nothing happens PS : Script
    4) I need to have a way to cut down threes and then have to put it in fire to make it least longer.
    5) How do i make my gui look better? It looks really bad, its grey, like all guis you create. I have that skin :D
    I really love system of inventory and BUILDING in UNTURNED, so if anyone can help me with making the building like that, please help me with that :)

    SCRIPT(I have it attached to the COLA bottle):
    #pragma strict

    //This script allows you to insert code when the Item is used (clicked on in the inventory).

    var deleteOnUse = true;

    private var playersInv : Inventory;
    private var item : Item;
    private var survivalScript : GUISurvival;
    @script AddComponentMenu ("Inventory/Items/Item Effect")
    @script RequireComponent(Item)

    //This is where we find the components we need
    function Awake ()
    {
    playersInv = FindObjectOfType(Inventory); //finding the players inv.
    if (playersInv == null)
    {
    Debug.LogWarning("No 'Inventory' found in game. The Item " + transform.name + " has been disabled for pickup (canGet = false).");
    }
    item = GetComponent(Item);
    }

    //This is called when the object should be used.
    function UseEffect ()
    {
    survivalScript.currentThirst += 10; /(THIS IS THE THING THAT WILL MAKE YOUR LESS THIRSTY)

    //Play a sound
    playersInv.gameObject.SendMessage("PlayDropItemSound", SendMessageOptions.DontRequireReceiver);

    //This will delete the item on use or remove 1 from the stack (if stackable).
    if (deleteOnUse == true)
    {
    DeleteUsedItem();
    }
    }

    //This takes care of deletion
    function DeleteUsedItem()
    {
    if (item.stack == 1) //Remove item
    {
    playersInv.RemoveItem(this.gameObject.transform);
    }
    else //Remove from stack
    {
    item.stack -= 1;
    }
    Debug.Log(item.name + " has been deleted on use");
    }



    THANK YOU A LOT!!! If you help me out, if you want i can put your name in subtitles. The game is going to be called SnowBlind, please check it out if i get help by all the good people around there, i will try to make a WEBSITE about the game, or i will just add it to some indie sites like GAMEBOLT.

    THANK YOU A LOT!!!!


    Tom K.
     
  2. TomKamin

    TomKamin

    Joined:
    Sep 16, 2014
    Posts:
    8
    5) How do i make my gui look better? It looks really bad, its grey, like all guis you create. I haTe that skin :D
    I would love to have it any way so it looks better. Unturned is a game that shows out how nice gui should look...
     
  3. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,300
    You use the new GUI, from the beta.
     
  4. TomKamin

    TomKamin

    Joined:
    Sep 16, 2014
    Posts:
    8
    SO i should download the unity 4.6 beta and do the gui in that? I dont know whats going to happen when i will try to load my game. But thanks! I will try that, it looks super COOL!
     
  5. Hikiko66

    Hikiko66

    Joined:
    May 5, 2013
    Posts:
    1,300
    Make sure you backup before you update. Always.

    Run through the new GUI tutorials, and if you need help with it you can go to the beta forum.
     
  6. TomKamin

    TomKamin

    Joined:
    Sep 16, 2014
    Posts:
    8
    Thank you!