How do I make a random Item generator with no repeats?

Get help using Construct 2

Post » Mon Apr 13, 2015 1:25 pm

I have a few idea's how to do this but I want to know if anyone could help me with this before.

I was thinking of using an array with each item corresponding to an x and if that x has 1 in it will spawn the item but if a 0 would choose another random until an item that has 1 in.

If someone could let me know if this is a good idea or has a better solution please let me know?

I want it to be a randomly generated item as such in binding of Isaac if that helps for reference.
B
5
S
1
Posts: 35
Reputation: 445

Post » Tue Apr 14, 2015 10:18 am

For sure array is the best way to do it.
Take a look at this tutorial :
https://www.scirra.com/tutorials/315/ge ... duplicates
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], ismael123, xmnboy and 6 guests