User Tools

Site Tools


quick_and_dirty_if_then_else_intro

Multiple choice If Then Else - Quick and dirty

Decision making is the hardest part im Wherigo programming. The good news is that once you have understood how it works, you are ready to build great cartridges.

Here is a quick multiple choice solution to the decision making problem:

Create a Variable (variable tab) to store the answers

Create an Input (Input Tab) and

  1. reference it to your variable
  2. select multiple choice as input type
  3. add your answers in the multiple choice field

Compare user input

(stored in the variable answer) with the correct answer (Expression tab)

Check the users answer

after each input (Input/Events tab)

You should improve this basic concept by adding a Message that informs the user that his input was wrong and that he has to answer the question again. Also add a message that informs the user that he can see a new Zone after a correct input.

Send me an email if you would like to have the above cartride segment to upload it to your account.

quick_and_dirty_if_then_else_intro.txt · Last modified: 2013/10/11 13:52 (external edit)