Hi My Friends,
I'm trying to create an interactive riddle that uses comments as the riddle description, an image and a confirmation statement to confirm a correct answer.
At start, a start button in the woorksheet is clicked to randomly assign the block of 16 cells with the riddle descriptions as comments. (once the cells are commented, the start button is disabled)
When the user points the mouse at a comment the programme uses speech.speak to read it. The user enters the answer in the cell and clicks a submit button to submit the answer. The answer is compared with a word or phrase corresponding to the description in the cell comment.
If the answer is not correct, the user is requested to try again. (The request must be both wrtten and spoken/read by the programme).
If the answer is correct, the programme loads a corresponding image and a confirmation message in a frame and the comment for that cell is cleared. (The message is read by the programme.) This is done until all the questions are answered, but there is the option on the frame whether the user would like to continue, restart or exit the game.
Every attempt is counted so that when the game is over the total correct answers are multiplied by the score per question and the percentage of that result is found of the total attempts multiplied by the score per question. (total correct answers*score per question/ number of attempts*score per question)*100
We will use the names of 16 animals as the answers.
The arrays below show the names of the animals, the riddles which go into the comment text note and the names of the images
names of the animals
myAnswer(1) = "baboon"
myAnswer(2) = "black marlin"
myAnswer(3) = "deer"
myAnswer(4) = "chimpanzee"
myAnswer(5) = "ostrich"
myAnswer(6) = "oarfish"
myAnswer(7) = "stonefish"
myAnswer(8) = "peregrine falcon"
myAnswer(9) = "wolf"
myAnswer(10) = "cheetah"
myAnswer(11) = "shark"
myAnswer(12) = "gazelle"
myAnswer(13) = "gorilla"
myAnswer(14) = "orangutan"
myAnswer(15) = "octopus"
myAnswer(16) = "flying fish"
the riddles which go into the comment text note
myQuestion(1) = "I am a large ground-dwelling monkey. " & Chr(10) & "I have a long pointed face like a dog and my teeth are large. " & Chr(10) & "I can be found in Africa and Asia. "
myQuestion(2) = "I am a very large fish. " & Chr(10) & "I can be found in the warm tropical waters of the Indian and Pacific Oceans. " & Chr(10) & "I am the fastest fish in the world. "
myQuestion(3) = "I am an animal with long legs. " & Chr(10) & "I eat grass, leaves, etc. " & Chr(10) & "I can run fast. " & Chr(10) & "Most of my males have horns shaped like branches. "
myQuestion(4) = "I am a very intelligent African ape. " & Chr(10) & "I am small. " & "I have long dark-brown hair, but there are no hairs in my face and on my ears. " & Chr(10) & "I am native to equatorial Africa. "
myQuestion(5) = "I am a very large African bird. " & Chr(10) & "I have a long neck and long legs. " & Chr(10) & "I cannot fly, but I am the fastest bird on land. "
myQuestion(6) = "I am a long, eel-shaped fish. " & Chr(10) & "I can grow up to 7 m/23 ft. " & Chr(10) & "I have a red head fin and dorsal fin. " & Chr(10) & "I can be found in the tropical Atlantic waters. "
myQuestion(7) = "I am a fish. " & Chr(10) & "My body looks like rock. " & Chr(10) & "I use that to hide from my enemies. " & Chr(10) & "My bite is poisonous. " & Chr(10) & "I can be found among the rocks in the sea. " & Chr(10) & "I live in the tropical waters. "
myQuestion(8) = "I am a blue-grey black and white bird. " & Chr(10) & "I hunt other birds for my food. " & Chr(10) & "I am therefore known as a bird of prey. " & Chr(10) & "I can be trained to hunt for sport. " & Chr(10) & "I am the fastest bird in the air. " & Chr(10) & "I can fly up to 320 km/h (200mph). " & Chr(10) & "I can be found on every continent. "
myQuestion(9) = "I am a large wild dog. " & Chr(10) & "I hunt and eat other animals. " & Chr(10) & "We live and hunt in groups. " & Chr(10) & "Our group is called a pack. " & Chr(10) & "You can find us in North America and Eurasia. "
myQuestion(10) = "I am a large cat. " & Chr(10) & "I wear a yellowish brown and black-spotted coat. " & Chr(10) & "I have a small head, slender body, and long legs. " & Chr(10) & "I am the fastest animal on land. " & Chr(10) & "I can be found in Africa and Southwestern Asia. "
myQuestion(11) = "I am a large fish with a long body and sharp teeth " & Chr(10) & "I have a thick and rough skin. " & Chr(10) & "I have a cartilaginous skeleton and two dorsal fins on back. " & Chr(10) & "I can sometimes be seen above the water. "
myQuestion(12) = "I am a small graceful and swift antelope." & Chr(10) & "I have long ringed horns, large eyes and black face markings. " & Chr(10) & "I can be found in plains of Africa and Asia. "
myQuestion(13) = "I am the largest ape. " & Chr(10) & "I have a short but very powerful body and coarse dark hair." & Chr(10) & "You can find me in the western and central part of Africa."
myQuestion(14) = "I am a large long-armed ape. " & Chr(10) & "I am like a monkey, but I don't have a tail. " & Chr(10) & "I have reddish hair. " & Chr(10) & "You can find me in the islands of Borneo and Sumatra in the Pacific Ocean. " & Chr(10) & "My name means forest person. " & Chr(10) & "I look like a human being, but I have hairs all over my body. "
myQuestion(15) = "I am a sea creature. " & Chr(10) & "I have a big head, a soft oval body, well-developed eyes, and eight long arms. " & Chr(10) & "I live on the ocean floor. " & Chr(10) & "I can be found in the big seas. "
myQuestion(16) = "I am a fish. " & Chr(10) & "I have fins that can be held like wings. " & Chr(10) & "I can glide short distances above the surface of the water using my very large fins. " & Chr(10) & "You can find me in the warm or tropical seas. "
the names of the images
myImage(1) = "baboon.jpeg"
myImage(2) = "black marlin.jpeg"
myImage(3) = "deer.jpeg"
myImage(4) = "chimpanzee.jpeg"
myImage(5) = "ostrich.jpeg"
myImage(6) = "oarfish.jpeg"
myImage(7) = "stonefish.jpeg"
myImage(8) = "peregrine falcon.jpeg"
myImage(9) = "wolf.jpeg"
myImage(10) = "cheetah.jpeg"
myImage(11) = "shark.jpeg"
myImage(12) = "gazelle.jpeg"
myImage(13) = "gorilla.jpeg"
myImage(14) = "orangutan.jpeg"
myImage(15) = "octopus.jpeg"
myImage(16) = "flying fish.jpeg"
Let the confirmation message be "Yes, I'm a/an + the name of the animal"
Indicate where the image path should be (or you may use any image you like)
There will be a messagebox that requests for bale/bail out if the user is not able to answer a given riddle after three attempts. Clicking yes produces the riddle, the image and the answer "I am a/an" + the name.
if you need further information, let me know and I'll provide.
if possible, add notes so i can learn from the code.
Thanks for your usual cooperation.
Thanks very much. I'll try it and give you feedback. Have a blessed day
I'm trying to create an interactive riddle that uses comments as the riddle description, an image and a confirmation statement to confirm a correct answer.
At start, a start button in the woorksheet is clicked to randomly assign the block of 16 cells with the riddle descriptions as comments. (once the cells are commented, the start button is disabled)
When the user points the mouse at a comment the programme uses speech.speak to read it. The user enters the answer in the cell and clicks a submit button to submit the answer. The answer is compared with a word or phrase corresponding to the description in the cell comment.
If the answer is not correct, the user is requested to try again. (The request must be both wrtten and spoken/read by the programme).
If the answer is correct, the programme loads a corresponding image and a confirmation message in a frame and the comment for that cell is cleared. (The message is read by the programme.) This is done until all the questions are answered, but there is the option on the frame whether the user would like to continue, restart or exit the game.
Every attempt is counted so that when the game is over the total correct answers are multiplied by the score per question and the percentage of that result is found of the total attempts multiplied by the score per question. (total correct answers*score per question/ number of attempts*score per question)*100
We will use the names of 16 animals as the answers.
The arrays below show the names of the animals, the riddles which go into the comment text note and the names of the images
names of the animals
myAnswer(1) = "baboon"
myAnswer(2) = "black marlin"
myAnswer(3) = "deer"
myAnswer(4) = "chimpanzee"
myAnswer(5) = "ostrich"
myAnswer(6) = "oarfish"
myAnswer(7) = "stonefish"
myAnswer(8) = "peregrine falcon"
myAnswer(9) = "wolf"
myAnswer(10) = "cheetah"
myAnswer(11) = "shark"
myAnswer(12) = "gazelle"
myAnswer(13) = "gorilla"
myAnswer(14) = "orangutan"
myAnswer(15) = "octopus"
myAnswer(16) = "flying fish"
the riddles which go into the comment text note
myQuestion(1) = "I am a large ground-dwelling monkey. " & Chr(10) & "I have a long pointed face like a dog and my teeth are large. " & Chr(10) & "I can be found in Africa and Asia. "
myQuestion(2) = "I am a very large fish. " & Chr(10) & "I can be found in the warm tropical waters of the Indian and Pacific Oceans. " & Chr(10) & "I am the fastest fish in the world. "
myQuestion(3) = "I am an animal with long legs. " & Chr(10) & "I eat grass, leaves, etc. " & Chr(10) & "I can run fast. " & Chr(10) & "Most of my males have horns shaped like branches. "
myQuestion(4) = "I am a very intelligent African ape. " & Chr(10) & "I am small. " & "I have long dark-brown hair, but there are no hairs in my face and on my ears. " & Chr(10) & "I am native to equatorial Africa. "
myQuestion(5) = "I am a very large African bird. " & Chr(10) & "I have a long neck and long legs. " & Chr(10) & "I cannot fly, but I am the fastest bird on land. "
myQuestion(6) = "I am a long, eel-shaped fish. " & Chr(10) & "I can grow up to 7 m/23 ft. " & Chr(10) & "I have a red head fin and dorsal fin. " & Chr(10) & "I can be found in the tropical Atlantic waters. "
myQuestion(7) = "I am a fish. " & Chr(10) & "My body looks like rock. " & Chr(10) & "I use that to hide from my enemies. " & Chr(10) & "My bite is poisonous. " & Chr(10) & "I can be found among the rocks in the sea. " & Chr(10) & "I live in the tropical waters. "
myQuestion(8) = "I am a blue-grey black and white bird. " & Chr(10) & "I hunt other birds for my food. " & Chr(10) & "I am therefore known as a bird of prey. " & Chr(10) & "I can be trained to hunt for sport. " & Chr(10) & "I am the fastest bird in the air. " & Chr(10) & "I can fly up to 320 km/h (200mph). " & Chr(10) & "I can be found on every continent. "
myQuestion(9) = "I am a large wild dog. " & Chr(10) & "I hunt and eat other animals. " & Chr(10) & "We live and hunt in groups. " & Chr(10) & "Our group is called a pack. " & Chr(10) & "You can find us in North America and Eurasia. "
myQuestion(10) = "I am a large cat. " & Chr(10) & "I wear a yellowish brown and black-spotted coat. " & Chr(10) & "I have a small head, slender body, and long legs. " & Chr(10) & "I am the fastest animal on land. " & Chr(10) & "I can be found in Africa and Southwestern Asia. "
myQuestion(11) = "I am a large fish with a long body and sharp teeth " & Chr(10) & "I have a thick and rough skin. " & Chr(10) & "I have a cartilaginous skeleton and two dorsal fins on back. " & Chr(10) & "I can sometimes be seen above the water. "
myQuestion(12) = "I am a small graceful and swift antelope." & Chr(10) & "I have long ringed horns, large eyes and black face markings. " & Chr(10) & "I can be found in plains of Africa and Asia. "
myQuestion(13) = "I am the largest ape. " & Chr(10) & "I have a short but very powerful body and coarse dark hair." & Chr(10) & "You can find me in the western and central part of Africa."
myQuestion(14) = "I am a large long-armed ape. " & Chr(10) & "I am like a monkey, but I don't have a tail. " & Chr(10) & "I have reddish hair. " & Chr(10) & "You can find me in the islands of Borneo and Sumatra in the Pacific Ocean. " & Chr(10) & "My name means forest person. " & Chr(10) & "I look like a human being, but I have hairs all over my body. "
myQuestion(15) = "I am a sea creature. " & Chr(10) & "I have a big head, a soft oval body, well-developed eyes, and eight long arms. " & Chr(10) & "I live on the ocean floor. " & Chr(10) & "I can be found in the big seas. "
myQuestion(16) = "I am a fish. " & Chr(10) & "I have fins that can be held like wings. " & Chr(10) & "I can glide short distances above the surface of the water using my very large fins. " & Chr(10) & "You can find me in the warm or tropical seas. "
the names of the images
myImage(1) = "baboon.jpeg"
myImage(2) = "black marlin.jpeg"
myImage(3) = "deer.jpeg"
myImage(4) = "chimpanzee.jpeg"
myImage(5) = "ostrich.jpeg"
myImage(6) = "oarfish.jpeg"
myImage(7) = "stonefish.jpeg"
myImage(8) = "peregrine falcon.jpeg"
myImage(9) = "wolf.jpeg"
myImage(10) = "cheetah.jpeg"
myImage(11) = "shark.jpeg"
myImage(12) = "gazelle.jpeg"
myImage(13) = "gorilla.jpeg"
myImage(14) = "orangutan.jpeg"
myImage(15) = "octopus.jpeg"
myImage(16) = "flying fish.jpeg"
Let the confirmation message be "Yes, I'm a/an + the name of the animal"
Indicate where the image path should be (or you may use any image you like)
There will be a messagebox that requests for bale/bail out if the user is not able to answer a given riddle after three attempts. Clicking yes produces the riddle, the image and the answer "I am a/an" + the name.
if you need further information, let me know and I'll provide.
if possible, add notes so i can learn from the code.
Thanks for your usual cooperation.
Thanks very much. I'll try it and give you feedback. Have a blessed day