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

Random numbers

Discussion in '2D' started by otavioalfenas, Feb 12, 2015.

  1. otavioalfenas

    otavioalfenas

    Joined:
    Feb 12, 2015
    Posts:
    1
    Hello team, I wonder how do I generate random numbers, covering the screen, however these numbers have to be collision. I'm for more than one month trying to do this but I'm not getting it. can you help me?
    with some example or something?
    otavioalfenas@hotmail.com
     
  2. Wulf_LWG

    Wulf_LWG

    Joined:
    Jan 28, 2015
    Posts:
    1
    Not an attempt to sounds like a jerk but....

    Learn to generate random numbers.
    Learn to make cubes or something with meshes showing the numbers.
    script the cubes to generate on screen

    Maybe look into the match 3 demo? That should have a lot of the parts you want.

    The key to learning is knowing what you need to know.
    Always break your problem down to it's smallest parts then tackle it.

    Hope it helps some.
     
  3. OboShape

    OboShape

    Joined:
    Feb 17, 2014
    Posts:
    836
    There are a load of resources here on the forum, and if your just starting, get a look round the learn section..
    its unlikely that you are the first to ask these questions, so, it would be in your best interest to have a quick search on the forum first :)
    https://www.google.com/cse/home?cx=001712401338047450041:csfhqk-trfa
    (nice link that searches the unity universe and more lol)

    but please, have a look at the learn section, there is a plethora of info and tutes there, thats what got me started many moons ago.
    http://unity3d.com/learn

    between the tutorials and the forum searches, i can count on one hand the ammount of questions ive had to ask over the year.

    break your problem down into sections.
    1. random number generation
    2.how to make my numbers appear on a sprite (spritesheet)
    3. how to put colliders on them
    4 how to place them over the screeen


    makes it alot easier to break it down, and concentrate one one aspect then move on..

    but here you go, starter for 10;
    random number: http://lmgtfy.com/?q=how to generate random numbers in unity
     
    Last edited: Feb 13, 2015
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    And me also not trying to sound like a jerk, but next time posting explain what you have already tried and how it has failed. Just saying you have tried and listing the time spent attempting doesn't tell us anything except you tried one solution in one month and failed.
    What have you already done? What was the result?

    And follow wulf and obo's helpful advice.