GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Only Odd Rows?

Hey all,
I'm working on a text-based puzzle project, which I have set up in tables.
Each row contains a question in the 1st column, number of letters in the 2nd column, and columns 3+ each contain a letter of a word that is the answer.
I am wondering if there is a way to only select odd-number rows when randomly selecting the next question.
Any ideas?

Comments

  • Two.ETwo.E Posts: 572Member
    edited September 21
    1. Are you Alternating from only Even rows, and then next Question is only Odd rows?
    2. Since its random, why not just put all the "Odd" row questions in the first half of the table, and the "Even" row questions in the second half of the table, then randomly choose from either row 1 - 10, or 11 - 20, as an example.

    Best,
    Two.E

  • tatiangtatiang Posts: 11,815Member, Sous Chef, PRO, Senior Sous-Chef
    edited September 21

    Totally agree with @Two.E but if you indeed do want to select only odd rows, try this:

    Let's say you have 20 rows...

    Change attribute game.whichRow to random(1,10) * 2 - 1

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • rainwaterstudiosrainwaterstudios Posts: 172Member, PRO

    @Two.E said:
    1. Are you Alternating from only Even rows, and then next Question is only Odd rows?
    2. Since its random, why not just put all the "Odd" row questions in the first half of the table, and the "Even" row questions in the second half of the table, then randomly choose from either row 1 - 10, or 11 - 20, as an example.

    Best,
    Two.E

    Thanks for your input. Each row included two forms of the same word; the even rows are the word, and the odd rows are people's names that are homophones of the word.
    For instance, for the answer to "Eugene incorporates all DNA of an organism" row 1 would be a series of text attributes, one letter per column, spelling out 'genome', while row 2 would spell out 'Gene Ohm'.
    So for every word row, there is a name row after it.

  • rainwaterstudiosrainwaterstudios Posts: 172Member, PRO

    @tatiang said:
    Totally agree with @Two.E but if you indeed do want to select only odd rows, try this:

    Let's say you have 20 rows...

    Change attribute game.whichRow to random(1,10) * 2 - 1

    Awesome, that's precisely what I was looking for. Thanks! :smiley:

Sign In or Register to comment.