xxXReichoXxx Posted December 19, 2011 Author Share Posted December 19, 2011 how to use a random number event so its output is a random number from 1 to 100?sry i dont know much vb6 anyways it should be simple.thanks to anyone who will post :) Link to comment Share on other sites More sharing options...
emblem Posted December 19, 2011 Share Posted December 19, 2011 Min + Int(Rnd * (Max - Min))Returns a random number between Min and Max.The random number will never be Max though, iirc. Link to comment Share on other sites More sharing options...
xxXReichoXxx Posted December 19, 2011 Author Share Posted December 19, 2011 THANK YOUUU it works :))this is so cool. it wount hit the same damage with spell any more. that what i did``` Vital = Spell(spellNum).Vital Dim min11 As Integer Dim max11 As Integer Dim vital11 As Integer max11 = "101" min11 = "1" vital11 = "" & Int(Rnd * (max11 - min11)) Vital = Vital + vital11```(modcombat) castspell sub Link to comment Share on other sites More sharing options...
azkanan Posted December 19, 2011 Share Posted December 19, 2011 I've been carrying around an extension with me for a while now that creates a Random process.All you have to do to put it to use is type: "Rand(min,max)".ie;```Dim varNumber As IntegervarNumber = Rand(1, 10)label1.Caption = varNumber```[modRandom.bas](http://puu.sh/b13V)I'm not sure if you want to use it, thought I'd share it anyway. I believe it's from an older version of Eclipse but it works fine with anything I've put it to use with. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now