Search Unity

Virtual farming and money script like ArmA 3 Altis Life.

Discussion in 'Scripting' started by JDX, Sep 20, 2014.

  1. JDX

    JDX

    Joined:
    Jun 16, 2013
    Posts:
    7
    I hope many of you know the game Arma3 Altis Life. In this game you can walk over speacial places and then a GUI button appears which says farm like for example peaches. If you press the button it takes about 3 seconds and then in your Inventory it says "3 Peaches" if you do this often your Inventory gets full (Inventory place 100).
    Then you can go to a trader press "I" for Inventory and then click on the peaches. Under the peaches it says "Sell" if you sell them they get removed from your Inventory and you get money addet in your pocket.
    I tried to make 2 scripts One for farming and one for the trader but I am still a beginner and I am not sure how to make them. Can you guys help me pls that would be awesome thx.
     
  2. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Beginners don't tackle such complex subjects. Try something simpler.
     
  3. BmxGrilled

    BmxGrilled

    Joined:
    Jan 27, 2014
    Posts:
    239
    If you know how to script but are just starting out it depends on how much you know, for instance, if you know how to use arrays you're off to a good start, but otherwise you need to learn more stuff first.
     
  4. bgyusddssdbui

    bgyusddssdbui

    Joined:
    Dec 8, 2019
    Posts:
    3
    I waited 5 years to tell you your reply is worthless and next time you should just not reply.
     
  5. elmar1028

    elmar1028

    Joined:
    Nov 21, 2013
    Posts:
    2,359
    Why wait so long?
     
    Last edited: Dec 8, 2019
  6. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    Even tho this is a very old thread, since it's been necroed anyways, i'll add my advice for future readers.

    When having a large(ish) task like described by above, you first need to divide it into smaller tasks. You do that as many times as necessary, until you feel comfortable solving each small task - and after solving all of them you solved the entire big task. This is called Divide and Conquer and is quite commonly done.
    In your example, you want lots of things. Some of the parts included are an inventory system, a transfer system (between inventories), an interaction system including a timer and so on. Each of these subtasks can then be divided into smaller tasks again. The inventory for example, consists of an UI-aspect, as well as some scripting. When looking for these things you should already find plenty of tutorials to explain them. In the end, looking up these smaller tasks is a lot easier than looking for one specific big one. You just need to be able to break down what you want and look its components up.
     
    elmar1028 likes this.