One of wait for any key or anything similar in random order

Hi! I’m looking for a bracketed version of “Wait for any key” or a non bracketed but controllable version of “one of” “or” “inrandom order”…

okay so what I wanna do is insert complex quotes, so it’ll always have the right dedication.

There’s a workaround that’s a bit heavy on the code but i was hoping for a bit of intelligent coding to help me out.

so it should give me a quote, but sometimes in pieces with “wait for any key;” in there. sometimes, but not always.

and at the end, it would have to also cite the correct source.

So what i would need is a way to use “one of” “or” “in random order” in regular code, to say blah: one of: say "blah"; wait for any key; say "giggity"; or say "fart noise"; in random order; say "- source"; line break; wait for any key.

or in printed text, say "something[line break][wait for any key]something else[line break]";

You can use a say phrase to run code at a point in a say message.

[code]to say wait-for-any-key:
wait for any key.

to say blah:
say “[one of]blah[wait-for-any-key]giggity[or]fart noise[in random order]”.

i’m gonna try that as soon as i get home :slight_smile: thx

You can recreate the “in random order” behavior with a table of rules:

Every turn:
	do a randomly ordered table rule.

This is the alpha rule:
	say "Alpha.";

This is the beta rule:
	say "Beta.";

This is the gamma rule:
	say "Gamma.";

This is the delta rule:
	say "Delta.";

This is the epsilon rule:
	say "Epsilon.";

To do a randomly ordered table rule:
	if random-rule-table-marker < 0 or random-rule-table-marker >= number of rows in Table of Random Rules:
		sort the Table of Random Rules in random order;
		now random-rule-table-marker is 0;
	increment random-rule-table-marker;
	choose row random-rule-table-marker in the Table of Random Rules;
	follow the rule entry.

The random-rule-table-marker is initially -1.

Table of Random Rules
alpha rule
beta rule
gamma rule
delta rule
epsilon rule

How did you get inform to recognise ‘wait for any key’? I can’t seem to get it to work

It’s in the Basic Screen Effects extension, so you have to write:

Include Basic Screen Effects by Emily Short.

Oh hey, thanks! :~)