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.
Does ACS random(n, m); allow for multiple random numbers in the same tic?
-
Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?
Test it?
Code: Select all
script 1 NET
for (int x; x < 20; ++x)
Log(d:random(1,2));
Last edited by Llewellyn on Mon Dec 03, 2012 4:13 am, edited 1 time in total.
-
Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?
That one instance could work, but there could be something hidden which activates upon various flags or such that would crop up later on.Llewellyn wrote: Test it?Code: Select all
script 1 NET for (int x; x < 20; ++x) Log(d:random(1,2));
Therefore probably only a developer can truly answer my question, but thanks for trying.
- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: Does ACS random(n, m); allow for multiple random numbers in the same tic?
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.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.