Randomizing.

Discussion in 'Archives' started by -------owned-------, Apr 30, 2007.

Randomizing.
  1. Unread #1 - Apr 30, 2007 at 4:33 PM
  2. -------owned-------
    Joined:
    Jan 27, 2007
    Posts:
    1,225
    Referrals:
    0
    Sythe Gold:
    0

    -------owned------- Guru
    Banned

    Randomizing.

    Another small tut, but I post many as 1 ;)
    This will show u how to randomize. Add this to form_load:
    Code:
    x = int(rnd*6)
    randomize
    select case x
    case 1:
    msgbox "the number of x is 1 =O"
    case 2:
    msgbox "2 hit you ;)"
    case 3:
    msgbox "My sister is 3 years old =D"
    case 4:
    msgbox "The Swedish word for four is fyra =P"
    case 5:
    msgbox "I hated grade 5"
    case 6:
    msgbox "Six :)"
    end select
    
    If you've read any other guides, you should know what select case does. x = int declares that x is an integer, and rnd*6 is the number, might be 1,2,3,4,5 or 6 ;P
     
< Make your own stink bombs (very easy) | [email protected] >

Users viewing this thread
1 guest


 
 
Adblock breaks this site