Tuesday, 4 September 2007

Randomly pick a dialog response

gc_rand_1of(int iMax)
Used to randomly pick a dialog response.

Use parameters 2 through X for each entry after the first, decrementing by 1 for each branch down.

Example: 3 entries would have the following conditionals:

gc_rand_1of(3)

gc_rand_1of(2)

The final entry doesn't need a check since it is a certainty.

No comments: