Results 1 to 9 of 9

Thread: [RESOLVED] Help with Role Playing Game on VB

Threaded View

  1. #5
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: Help with Role Playing Game on VB

    Looks like its working! only problem is that it goes under 3 but not over 6.

    Sounds like what Doogle said:

    Int(6 * Rnd) will generate an Integer number between 0 and 5, adding 1 will give a number between 1 and 6

    So why is that a problem? Can you not just ignore numbers less than 3?

    Code:
    If intBHP < 6 Then
    intBHP = 6
    End If
    
    If intBHP > 3 Then
    intBHP = 3
    If the number is 1, 2, 3, 4, 5 you make intBHP = 6

    Then immediately following that you say if the number is 4, 5, 6, etc then make it = 3

    First time through intBHP = 5 so you make it equal 6 then because it's greater than 3 you you make it 3. So, 5 becomes 6 just to become 3.

    Is this what you want?
    Last edited by jmsrickland; Jun 16th, 2011 at 06:22 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width