How to arrange a set of objects randomly in several fixed pl

Just started using Construct 2? Post your questions here

Post » Wed May 03, 2017 11:57 am

How to arrange a set of objects randomly in several fixed places?
I have 12 objects, and I want them to be arranged randomly at (every x time) in different fixed position and without any overlap between them.
For better illustration, at position (100,200,300,400,500,600,700,800,900,1000,1100,1200)I want to distribute 12 objects on these twelve position randomly (every x second) without duplication or overlap.
Please help me....
B
3
Posts: 4
Reputation: 183

Post » Wed May 03, 2017 5:09 pm

HELP!!!
B
3
Posts: 4
Reputation: 183

Post » Thu May 04, 2017 3:13 am

To set up non-repeating random values, use two arrays. The first array stores your values, the second records the values you randomly pick from the first. After picking them, they get deleted out of the first array so you can't pick them again. Comments in capx.

https://www.dropbox.com/s/dcfbp93y4kmxo ... .capx?dl=0

You can store positions in the array rather than animation frame numbers if you want, if you're using 12 separate objects rather than 12 instances of one object.

Otherwise, plugin-smart-random_t163624 could help you.
Mistakes were made.
B
49
S
24
G
107
Posts: 1,579
Reputation: 60,299

Post » Thu May 04, 2017 8:02 am

thank you very mach oosyrag
B
3
Posts: 4
Reputation: 183


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests