fairyoggy Posted May 11, 2019 Share Posted May 11, 2019 hello! example: i have 2 windows with checkbox On each window 4 checkboxes. Only 1 checkbox with the correct answer for each window(a total of 2 correct checkboxes for two windows together). Total checkboxes 8 for two windows. So.. On the first window, the correct answer will be checkbox number 3. In the second window, the correct answer will be checkbox number 1. How do I make it so that if a player chooses the wrong checkboxes, a message would appear "You answered wrong" , If the player answered correctly "Congratulations you answered correctly" Link to comment
Dimos7 Posted May 11, 2019 Share Posted May 11, 2019 Well you need to check if checkbox is selected and then put the message Link to comment
SrSampaio32112321 Posted May 11, 2019 Share Posted May 11, 2019 (edited) outputChatBox ("Parabéns, você respondeu corretamente", getRootElement (),255,255,255,true) Na funçao do chatbox que para correta. É o mesmo que com uma mensagem diferente nas funções do chatbox erradas. Edited May 11, 2019 by MrShadows Link to comment
fairyoggy Posted May 11, 2019 Author Share Posted May 11, 2019 25 minutes ago, MrShadows said: outputChatBox ("Parabéns, você respondeu corretamente", getRootElement (),255,255,255,true) Na funçao do chatbox que para correta. É o mesmo que com uma mensagem diferente nas funções do chatbox erradas. Yes, I know how to call a message, I mean how to write the correct code, with checkboxes 1 hour ago, Dimos7 said: Well you need to check if checkbox is selected and then put the message How to correctly implement in code so that the correct answers of checkboxes from two windows? Link to comment
Dimos7 Posted May 11, 2019 Share Posted May 11, 2019 You need check two windows selected checkbox and put the message from eatch one Link to comment
savour Posted May 11, 2019 Share Posted May 11, 2019 Radio buttons will save you a lot of code, cuz in case of checkboxes you will need to check every checkbox ( in case if the player choose more than once ), However, if you want to continue with checkboxes; you gonna use guiCheckBoxGetSelected( checkbox ) and it will return true/false. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now