Hi, I’m building a quiz game and when someone finds a target image in a building they can scan it and a multiple choice question pops up. Somehow whatever answer I click, the answer is always B.. but that shouldn’t be the case. I’m trying to figure out why this happens for a couple of days (and nights) tried stacking order differences, different target controllers or only one. It all doesn’t matter.
The other strange thing is that the answer stays when I don’t scan the image anymore…except for target image 5 (out of 5). It’s one targetController.ts for all 5. But when I tried a targetController.ts for all 5 on its own this problem happens also… This is now driving me nuts…
Is someone able to help me? Or give me an example I can use?
If you need the code let me know, I will copy paste it. Or if some one of the 8th Wall team wants to help, my project Bedrijfshelden AR challenge is open for you to get in and see what’s going on.
all the help is very much appreciated!
Could you share your Image Target images here? Sounds like they’re getting mixed up.
Thanks for sharing! Those look pretty good to me at a first glance. Would you mind landing your changes and sharing the project with the support workspace?
Hi, yes the target images are not the problem, they all work! But when I scan one I get the right question, that should appear to this particular image, and A,B,C,D answers, but when choosing one of the answers the only correct answer seems to be B.. this is the case with target_1 and target_5. But the right answer for target_2 and target_3 should be C en the right answer to target_4 is D… The feedback text should dissapear when not seeing the target image anymore, but somehow this only works on target_5…
I’ve already shared my project with you! You’ve helped me great with the button click! That works now 
1 Like
Can you remind me of the project and workspace name? 
haha sorry I thought I posted that 
It’s Bedrijfshelden AR Challenge, Life On Marzj workspace
Thanks 
Just curious why don’t you have the question and answers as children of the Image Target object(s)? Might be a bit easier to keep track of what’s going if you do that.
Additionally I’d also add some more console logs to determine what’s going on here, because it looks like it could be that the UI is updating incorrectly or your component references aren’t being updated to the correct Image Target.
I’ve started that way, somehow I changed it. I did so many things that I honestly can’t remember why I’ve changed it in the end… maybe because I wasn’t able to connect the scoreText or something.. or because I was still struggling with the button click. I’ve tried so many things I’m loosing it..
Thanks, I will try that again!
I will let you know if I get it right this time
Someday I will understand 8th wall studio haha
Let me know how it goes! I’m considering making a quiz game Sample Project now. 
1 Like
I was crazy busy but finally can get back to the game! I do this in my spare time haha
well it’s funny, because I work across a museum and told them what I’m building and now they want me to do this for them also. Maybe having a template like this will be great for a lot of people! I can image you can use this for so many different things. I bet I’m not the only one! And I’m only a beginner. Maybe this is also good for beginner 8th Wallers (is this a word?
). I will let you know how far I get and share it so you can check it out too!
1 Like
Hi again,
This game is driving me nuts haha I’m getting stuck the whole time. This is what I’m facing now:
-
Feedback text only shows for one target (target_5) All targets are set up in the inspector with their own questionText, answer A-D and feedbackText. The code is identical for all, but only target_5 displays the feedback text when an answer is selected. The others log correctly in the console, but the feedback text doesn’t appear on screen.
-
Answer validation sometimes fails. For example, on target_2, the correct answer should be C, but even when pressing C it logs as false.
Only target_1 and target_5 return true on the right answer.
3.Special characters (ë, é, etc) are not supported in UI text. No matter which font I select, characters like ë always render as
I’ve tried double-checking all entity assignments in the inspector, copying the exact same setup from the working target_5.
Has anyone seen similar behavior? Or any idea. I will land the latest version of my game ‘Bedrijfshelden AR Challenge’.
Thanks in advance!
I can defenitly take a look at the project when I get some time. It sounds like there might be a race condition in your code which could be solved by using State Machines, I don’t remember if you’re already doing that. 
The special characters issue is expected as Studio UI doesn’t support non-english characters at the moment. The team has this on their radar. 
1 Like
Is there someone who can help me out? I client is interested so it would be great if I can finish it and use it as a template for future work!
I’ve landed some changes that should fix the issue, can you let me know if you’re still seeing the bug?
thanks! unfortunately nothing has changed for me..
only the hideous yellow warning is gone
thanks for that!
But still I don’t get why the answers for target 2, 3 and 4 are also ‘B’ → true.. and the actual correct answer is false (target 1 and 5 correct answers are B, but 2 and 3 should be C and target 4 should be D). I only get a feedback text when answering target 5. I cannot find what I do wrong!
It looks like the problem might be that the cursors are becoming stale because they are referenced in a function defined outside of the actual states. My suggestion would be to adjust your logic so that instead of passing in A, B, C, and D as strings, you place the code directly inside each listener and return true or false depending on whether the answer is correct. In practice you only need to know if the answer is right or wrong, so using a boolean might be a better choice than a string. Also, try to avoid placing functions above the state machine for now until I can take a closer look at what might be causing the issue.
thanks, I’ll try right away!