03-21-2015 02:17 AM
Hello
I have the ABC word's, each character one button. I have to create a random button array with 4,5,6..etc(variable) elements from these buttons. I have no idea whats the right way, how to creat these problem.
Thank you for your reply.
Solved! Go to Solution.
03-21-2015 05:26 AM
Use the Random Number inside of a FOR loop. To get a range of values, the typical way to do it would be rand*range size+min number. Since you are dealing with letters, you would want rand*26+0. This would give you an array of indecies corresponding to the letters your want.
03-21-2015 07:53 AM
03-21-2015 09:54 AM
Thank you.I attached one jpg, i need to useable buttons. Primarily if i push one button add one letter to array. I try to create a wordsearch game.
03-21-2015 10:11 AM
Why all the unwired buttons? It would be easier to have a single output of the event structure going into a single Build Array function.
Can you translate the sentence "I need to useable buttons" into English?
03-21-2015 10:23 AM
Please attach the VI instead of a blurry picture with most code hidden. What is the mechanical action of the buttons? If they are latch action, they belong inside their respective event case. Is there an event for the stop button?
Keep the array in a shift register and use build array to append an new element. No local variable or insert onto array needed. Whatever you are currently doing is highly comvoluted and overly complicated.
03-21-2015 10:24 AM
Sorry for my horrible english. I wanted to say i need random letters as buttons.
03-21-2015 10:28 AM
I attached.
03-21-2015 10:30 AM
@Blen86 wrote:
Sorry for my horrible english. I wanted to say i need random letters as buttons.
I still don't understand what that means. Can you show a picture?
A letter is not a button. Do you want buttons with random letters on them? How often should the letters change?
03-21-2015 10:45 AM