Page 1 of 1

Does ACS random(n, m); allow for multiple random numbers in the same tic?

Posted: Mon Dec 03, 2012 1:29 am
by Watermelon
I swear back on Skulltag if I called random(1, 2); in the same game tic it would ALWAYS return the same number.

Is online game play where the server generates a random number in ACS always going to be 'possibly' different if it generates lets say a ton of random numbers in the same game tic? I don't know if this was for demo compatibility or something. I believe it has changed recently but I'd like to make sure it has before I go building something up and finding out a core element of the game is not what I thought it was.

RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?

Posted: Mon Dec 03, 2012 4:08 am
by Llewellyn
Test it?

Code: Select all

script 1 NET
for (int x; x < 20; ++x)
Log(d:random(1,2));

RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?

Posted: Mon Dec 03, 2012 5:48 am
by Watermelon
Llewellyn wrote: Test it?

Code: Select all

script 1 NET
for (int x; x < 20; ++x)
Log(d:random(1,2));
That one instance could work, but there could be something hidden which activates upon various flags or such that would crop up later on.

Therefore probably only a developer can truly answer my question, but thanks for trying.

RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?

Posted: Tue Dec 04, 2012 6:29 am
by Torr Samaho
Watermelon wrote: That one instance could work, but there could be something hidden which activates upon various flags or such that would crop up later on.
There is nothing purposely hidden to make random() not random in online play. I just remember somebody reporting that adding bots somehow resets the random number generator.