|
-
Jun 26th, 2002, 01:44 PM
#1
Thread Starter
Lively Member
how do u randomize option button = true 4 a game
im including a pic. each one of the buttons are OptionButton, and what i need is way to get a random button to become true when the current button that is true is clicked.
oh and also need a way to count how many buttons the player has clicked.
i would be greatfull for any help i could get.
-
Jun 26th, 2002, 02:59 PM
#2
Not NoteMe
Put them in an array, if you havn't already, then call a random one.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Jun 26th, 2002, 11:39 PM
#3
Thread Starter
Lively Member
ok i have already put them in an aray, but how do i call random buttons to become true??
-
Jun 26th, 2002, 11:52 PM
#4
Member
Firstly why did you copy your whole post. You only needed the random bit.
Secondly, this isn't an exact thing of what you should do but perhaps try something like:
(assuming that your talking about enabling a button called button one and a label called count)
r as integer
r = 1 to 100
If button1.enabled = true then
button(r).enabled = true
end if
thirdly, the counter thing is like what I've already told you, something along the lines of
button1_click()
count.caption = count.caption + 1
110359
Why is it that when you kill one man people call you a murderer and when you kill one thousand you are a conqueror?
-
Jun 27th, 2002, 01:26 AM
#5
Not NoteMe
To get a random button, try this.
VB Code:
Randomize Timer 'This line only needs to appear once in your program (i suggest in form_load)
button((Rnd*(Ubound(button)+1-Lbound(button))) * Lbound).Enabled = true
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
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
|