Visual Basic 2008 Game a guess the number game. it really works and soz for the stuff ups.
Codes:
Button1:
Dim Therandom As New Random
If RadioButton1.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 5)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
ElseIf RadioButton2.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 15)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
ElseIf RadioButton3.Checked = True Then
Label1.Visible = False
Label2.Visible = False
Label3.Visible = False
Label1.Text = Therandom.Next(1, 50)
If TextBox1.Text = Label1.Text Then
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU ARE CORRECT!!"
Button1.Enabled = False
TextBox1.Enabled = False
Else
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True
Label3.Text = "YOU LOSE!!"
Button1.Enabled = False
TextBox1.Enabled = False
End If
End If
I found basic complicated, I use Game Maker 8 at the moment. I used this video to get the basics off /watch?v=1_xUqT4FBYs But then I used the tutorials on the yoyogames website.
ArttraTainment 3 days ago
It works!!
NONGAism 2 months ago
finaly i done it thanks man
panayiotis70 5 months ago
damn you have the code in the discription i wrote all that stuff and now i saw the code here -_- i have some problems with the New Game button
panayiotis70 5 months ago
@hamstertjes12345
I have a code which is written by me:
Label3.Visible = False TextBox1.Enabled = True Button1.Enabled = True Label1.Text = 0 RadioButton1.Checked = False RadioButton2.Checked = False RadioButton3.Checked = False TextBox1.Text = 0 End Sub
malaysia2111 5 months ago
where is the code for button 2?
hamstertjes12345 5 months ago
Thanksss !!!:)
robinscapepro 6 months ago
I have it working. I even modified my game to where it talks. But... I had to type the code for play again which was unpleasent...
freefungamesforu 7 months ago
It worked great! Thanks =)
704doon 7 months ago