Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Choosing random values inside a loop (was: In a hole in the bottom of the sea... Send help...)

$
0
0
So, I'm working on creating a randomly generated map in Sugarcube 2 for my game. It's slow, but I'll get there. I've run into my first issue however. What I'm trying to do is place a loop withing an array, and that loop contains a set function that will select a random number from a predetermined list. Here, the code will explain itself, or well better I I can at least.
[
<<for $i = 0; $i < 10; $i++>>
<<set $i to either (0, 0, 0, 1)
<</for>>
]

If someone could tell me where I went wrong or what I need to do would be great. Thank you in advance.

Viewing all articles
Browse latest Browse all 1844

Trending Articles