Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Need help with coding

Discussion in 'Scripting' started by iRuDz, Jan 3, 2017.

  1. iRuDz

    iRuDz

    Joined:
    Feb 1, 2016
    Posts:
    39
    Hello everyone, i'm trying to make a game like the Hungry Pumpkin minigame from this website http://2008.pumkin.com/index.php

    How would i go about making a game like that? I thought about making an array of game objects which will be the foods then randomly pick a food out of the array.
     
  2. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,175
    This game is interesting, I went into a barn pressed the play button and now there are dancing animals on my screen
    And now I'm serving a talking pumpkin who eats a glass of water with the glass I guess, great

    You need a class called Food with the capabilities of storing a gameobject and some helpful info obviously
    So you would have a list of the possible foods
    Then you need to create an array of 4 and pick 4 randomized elements
    Now the pumpkin needs to choose a number between 0 and 3, that will be the food he orders
    I'm not going to go into detail about the picking a food and saying a sentence part, there are tutorials about those
     
  3. iRuDz

    iRuDz

    Joined:
    Feb 1, 2016
    Posts:
    39
    lol yeah that game is a meme. Thanks for the help.
     
unityunity