Random Dialogue/No Repeats

Get help using Construct 2

Post » Tue Jan 07, 2014 2:16 am

Threw together a quick example.
We iterate through an array and delete values as they are returned.
https://dl.dropboxusercontent.com/u/139218609/examples/randomnorepeat.capx
If deleting the values isn't a viable option then you might add to the array depth and use it to store whether or not a value on the x axis been accessed.
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Post » Tue Jan 14, 2014 9:59 pm

@Noncentz705

Great example. I have a question: how can I restart the array without restart the layout?
B
74
S
14
G
4
Posts: 1,018
Reputation: 8,139

Post » Tue Jan 14, 2014 11:44 pm

Once the array is emptied it's width becomes 0; we'll re-size the array to a width of 10, and re-populate the x axis with new values. Hope that helps, if you have any questions just ask.

https://dl.dropboxusercontent.com/u/139218609/examples/randomnorepeat2.capx
B
11
S
2
G
1
Posts: 202
Reputation: 1,580

Post » Wed Jan 15, 2014 11:08 pm

@Noncentz705
Very good solution. I was looking for a randomization system without repetition and never knew how to use Array. This example was perfect. Many thanks for posting this solution.RenatoB2014-01-15 23:09:21
B
74
S
14
G
4
Posts: 1,018
Reputation: 8,139

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests