I'm working on designing a game, the problem now is that while I have a code for randomizing a number, its the same series every time. This isn't good for random, to know what you're going to roll before you hit the button sucks. Is there anything to help with this?

(If this is a redundant question that has been asked before, I apologize. Just direct me in the right direction. Thanks)

Here is what my code for random looks like;

Private Sub Attack_Click()

Value = Int((6 - 0) * Rnd + 0)

A1.Caption = Int((6 - 0) * Rnd + 0)
End Sub

you should put your code in code tags. Look ssomething like this:
[code=vb] ' your code goes here

[/code]
Will Look like this (how we like it):

'your code goes here

That said, somewhere in your form, probably on form load, (you usually only need to do this once, doing it more than once may cause a performance hit):

Randomize Timer

Thanks Comatose I was working for a while on trying to figure out how to make it look like real code. I guess I'm more of a noob than I'd like to admit but I appreciate the help. Thanks for the answer as well I haven't tried it yet, but I will soon. I just want to make sure I do it right before I sign off on the question.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.