|
-
Jun 15th, 2011, 06:31 PM
#1
Thread Starter
New Member
[RESOLVED] Help with Role Playing Game on VB
Ok so im making an old style RPG on VB6. I cant seem to get my randomize code to work.
heres what I have
Option Explicit
Dim intBHP As Integer
Dim intBossHP As Integer
Dim random As Integer
Private Sub cmdAtk_Click()
cmdBossAtk.Visible = True
cmdPots.Visible = False
End Sub
Private Sub cmdBossAtk_Click()
Randomize
random = Int(Rnd + 2)
random = intBHP
If intBHP < 6 Then
intBHP = 6
End If
If intBHP > 3 Then
intBHP = 3
End If
intBossHP = intBossHP - intBHP
txtBossHP.Text = intBossHP
End Sub
Private Sub cmdItem_Click()
cmdPots.Visible = True
cmdBossAtk.Visible = False
End Sub
Private Sub Form_Load()
intBossHP = 500
End Sub
I want the number to be random but it always picks the same number
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|