create random objects - no duplicate

Get help using Construct 2

Post » Wed Jul 16, 2014 5:32 am

Hi guys! Im using the create object on a family to get random sprites in my game. Is there a way to create random objects without duplicates? Thanks!
B
6
S
1
Posts: 8
Reputation: 870

Post » Wed Jul 16, 2014 5:58 am

You need to provide more detail. Like how many different types of sprites are there? how many sprites do you need to generate?
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jul 16, 2014 6:27 am

There is 10 sprites in the family and creating one at a time. Im using create object on the family to generate a random one which is working fine. I just dont want it creating the same one twice in a row.
B
6
S
1
Posts: 8
Reputation: 870

Post » Wed Jul 16, 2014 7:05 pm

You need to use the array plugin.
Check this examples :
viewtopic.php?f=147&t=106219&p=786791&hilit=random#p786791
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Sat Jul 19, 2014 12:51 am

I figured out my problem using an array. Thank you
B
6
S
1
Posts: 8
Reputation: 870

Post » Sun Jan 01, 2017 1:49 pm

i am currently trying to do the same thing but cant get it to work
could you post and example capx of how you did it
B
7
S
1
Posts: 21
Reputation: 522


Return to How do I....?

Who is online

Users browsing this forum: ASHKAR, brunopalermo, ItsAstro and 22 guests