Choosing a random layout.

Get help using Construct 2

Post » Fri Nov 15, 2013 10:54 am

Hi,

I think you might want to use some shuffling or helper storage, to avoid getting into the same room twice. Two ways (there are certainly more):

1) create array of size 250
2) fill it with consecutive integers
3) shuffle random pairs of a hundred or more times
4) make the player go from room to room, according to the (shuffled) order of elements in your array.

Way #2:

1- draw random integer as in examples you've seen above
2- if integer is already in the helper container (#3 below), repeat drawing
3- store the number in a helper array/string etc
4- proceed to the selected layout

Hope it helps,
Greg

B
18
S
3
G
3
Posts: 83
Reputation: 3,736

Post » Fri Nov 15, 2013 11:50 pm

@mrPeanut
@CJK

Thanks for the suggestions, I will report back once I try them out.
B
9
S
3
Posts: 52
Reputation: 1,260

Previous

Return to How do I....?

Who is online

Users browsing this forum: KTML5, newt and 28 guests