ADNox
June 9, 2013, 10:57pm
1
@2Ton and other skilled scripters.
I know it’s possible to select a random scene file, but is it possible to use a goto random within a single scene file? For example, say there’s a central room and from it you can choose #Go adventuring. How would the subsequent goto randomly select one of say, twelve possible adventures?
ADNox
June 9, 2013, 11:02pm
2
Also, how would you make some adventres repeat only once and others play multiple times?
I would do
*temp randscene
*rand randscene 1 12
*if randscene=1
*goto_scene adventure1
*if randscene=2
*goto_scene adventure2
And so on.
Oh wait did I misread? If you want all the adventures in the same file, just do it as
*temp randscene
*rand randscene 1 12
*if randscene=1
*goto adventure1
*if randscene=2
*goto adventure2
instead and be sure to “*label adventure1” etc
ADNox
June 9, 2013, 11:10pm
4
#fairygodfeather
And add another variable that monitors if a scene has been played, followed by a reroll to pick another, for the scenes intended to only run once?
@FairyGodfeather @ADNox
Remember that, with the latest version of ChoiceScript, *create and *temp commands need to have a value assigned:
*temp variable1 50
*temp variable2 true
*temp variable3 "variable"
The above will work. The below, will not:
*temp variable1
@Redgrave - Only *create requires you to declare a variable in the update. *temp allows but doesn’t require a starting value.
Yes, *temp has also been updated to allow (but not require) a value. You don’t have to change anything, but if you’d like, you can now write “*temp winner true”.
ADNox
June 10, 2013, 4:41am
9
Scratch that; the subroutines fatten it.
@Caddmuss ah! Thanks for that! I haven’t had time to play around with the latest version of ChoiceScript but I really must do, it seems.
@FairyGodfeather @ADNox sorry for that, and doubly sorry if I confused you!