GameSalad

Howdy, Stranger!

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

Spawn question 1x only from table

sinbotsinbot Posts: 94Member, PRO

I have a trivia game that is pretty straight forward. Random question from a table prompts for player to answer. Problem is the questions are occasionally repeating. I tried to watch some tutorials on how to spawn from tables without repeating and it seems quite convoluted since there are apparently a gazillion approaches/scenarios to spawning randomly from table. Can someone advise what the general point of the process is? There must be one specific part to add to the equation without having to listen through 30 minutes of details. In other words.. if you already have everything setup proper, is there something specific you can do to simply make the logic spawn a question one time only?

Comments

  • Two.ETwo.E Posts: 570Member, BASIC

    Have a Table (Master) that holds all the questions. For each gameplay, copy that table to another table (New).

    Keep a record of the row you are using, and once you have spawned the question, delete that row from the table (New).

    When using the random function, use TableRowCount(TableNEW) for the Max value.

    Best,
    Two.E

  • sinbotsinbot Posts: 94Member, PRO

    If you (or anyone else for that matter) would be cool with trying squeeze that into this game file I would be happy to tip you a few rupees via PayPal ; )

Sign In or Register to comment.