Hello,
I am trying to make a wheel of fortune app. I have found a tutorial on the wheel of fortune. I cant figure out how to select four items that the user has specified and put those into a certain spot in random order.
Any help is appreciated
Where?
Is there a way to put the labels onto were the words on the wheel are at the moment?
you need to check the rotateAngel mod 360,
if angel<=30, then label.text = windows,
else if angel<=90, then label.text = equipment,
...
else if angel<=330, then label.text = chairs,
else lable.text = windows
Sory please use lamen terms
Or if possible I have looked everywhere for an extension named rotateAngel Mod 360. Is that what you are talking about when stating "you need to check the rotateAngel mod 360"?
You find the modulo block in the math drawer
http://ai2.appinventor.mit.edu.ezproxy.canberra.edu.au/reference/blocks/math.html#modulo
Taifun
Ok that's making more sense but I'm still confused on what blocks to use?
Look for information on how to edit an image with transparent areas, I quickly made an example image but with less quality.
Ruleta2.aia (11.9 KB)
Here the arcs are built using Canvas.DrawArc, it does not use an image file.
Note: this is a tutorial code, it can be simplified by better use of variables and procedures.
Ruleta3.aia (15.1 KB)
Two questions?
What is the difference between this and the other one and, How could this be simplified?
Whenever you see repeating patterns of blocks, that is an opportunity to use a loop over increasing numbers and over items in a list.
If you read my post again, you will notice that I said that this new version does not use image files, you can simplify the code by making better use of variables and using procedures.
Yes, I know that, I was wondering what is the difference between using the image and the arches visual or performance-wise.
There are two proposals, the developer can choose the one he sees appropriate. In the file proposal you have to edit it to put transparent zones. The Arc proposal is easier to implement.