[Plugin] RandomArray

Post your completed addons to share with the community

Post » Wed Apr 25, 2012 7:12 am

Hi Joe7,

Do you know of any issues with RandomArray and the browser object. I use your plugin in two of my games, and when I add the browser object, the game does function properly. Have you heard of any issues?

Thanks,
Dave
B
6
S
1
G
1
Posts: 52
Reputation: 829

Post » Fri May 25, 2012 6:44 pm

Hi,

it seems like the PlugIn is working not correct in my case.
I generate an array from 1 to 60.
So I have 60 levels I want to be in a random order.
I use a counter (it starts from 1) and call the RandomArray.At(Counter-1) entry to access the first number in the list.
After a level is completed I add 1 to the counter and the game takes again RandomArray.At(Counter-1). This is the next random placed number on the list from RandomArray and the next level.

I do generate a logfile and it works besides one problem.
RandomArray seems to skip one number and generates it twice at the end.

So for example from 1 to 5 it generates: 3,5,2,4,4
One is skipped and 4 is twice at the end of the array.

I could not find any reason for this and would like to ask whether someone had similar issues?

Thanks

B
6
S
1
Posts: 16
Reputation: 464

Post » Thu Aug 23, 2012 1:43 am

@Joe7, would like to incorporate this for randomly moving some sprites around the screen to generate random levels, thanks.
B
28
S
4
G
3
Posts: 70
Reputation: 4,874

Post » Mon Nov 12, 2012 5:23 pm

Joe

I have 3 Randoms Arrays. I would like to multiply the a RandomArray1 x RandomArray2. And put the startValue on the RandomArray3.

I would like to set the StartValue to this:
RandomArray2.At(loopindex)*RandomArray3.At(loopindex)

How can I do that?????Tatiana Conde2012-11-12 17:24:25
B
3
Posts: 12
Reputation: 699

Post » Sun Jul 21, 2013 4:10 am

I know this is old, but what would be nice for me is to have it have a function called scramble, but with parameters.

So set a min, max, points of precision and an offset. So lets say I wanted unique multiples of 30, between 1 and 4390. The array would be nothing but unique multiples of 30. 30, 60, 90, 120, etc.

If I leave points of precision 0, it will be whole numbers.

If I pick an offset, it will automatically ignore PoP for easier use.
B
30
S
10
G
7
Posts: 416
Reputation: 7,239

Post » Tue Jul 23, 2013 10:25 pm

Hi, would be an excellent plugin, and exactly what I need, but why is it fixed at starting at 50? Is there any way to set the start value? e.g. I need to pick 5 unique numbers in the range of 15-30, then again between 31 and 45. I could do this by setting the width to 15, and picking the first 5 numbers, but they all start at 50!
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Wed Jul 24, 2013 2:07 pm

I liked joe7s plugin, but needed to be able to set the start value.

I have modified it to allow this.

I hope Joe7 will forgive me for updating it.

I also packaged it as a drag and drop addon & put it on github

The source, .c2addon and test capx are here: https://github.com/nutmix/RandomArray2

Use the gitub issue tracker to register bugs and feature requests.

If you want to modify the source, edit the docs, or improve the demo. please go ahead (by branching then requesting a merge)

I recommend using https://code.google.com/p/tortoisegit/
B
15
S
5
G
2
Posts: 357
Reputation: 3,691

Post » Fri Mar 27, 2015 12:40 pm

@Joe7 Discovered this plugin today, nice way to get random indexes from an array. Thank you also @nutmix, changing dynamically the random array width is very useful (and should be mandatory in such a plugin :p).
B
12
S
7
G
7
Posts: 446
Reputation: 4,268

Post » Tue Oct 11, 2016 5:26 pm

Hi @joe7 ,

It seems like the download link of v1.1 is now a dead link owing to Dropbox's policy change. Would you please help to update a new one? Thank you so much for making this great plugin!
B
58
S
10
G
3
Posts: 173
Reputation: 5,880

Post » Tue Oct 11, 2016 5:29 pm

Joe7 hasn't been around in years. You can try:
viewtopic.php?f=153&t=163624
ImageImageImage
B
67
S
19
G
121
Posts: 3,196
Reputation: 72,879

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 7 guests