Hello I'm trying to make a spell that displays a randomly generated string to each player however each time I restart the game and generate the supposedly random string I get the same pattern, the first one is the same, the second is the same and so on.
Is the "generate random integer between X and Y" really random? what does is used to generate it?
Also is there anyway I can fix this.
- Characters allowed for selection aswell as the length of the string
- Trigger that generates the random string and displays it.
I got my code with help from Komaqtion
Is the "generate random integer between X and Y" really random? what does is used to generate it?
Also is there anyway I can fix this.
- Characters allowed for selection aswell as the length of the string
Trigger:
- Random String
- Events
- Map initialization
- Conditions
- Actions
- Set Strings = ABCDEFGHJKLMNPQRSTUVWXYZ23456789
- Set StringLength = 5
- Events
- Trigger that generates the random string and displays it.
Trigger:
- PlayerString
- Events
- Player - Player 1 (Red) skips a cinematic sequence
- Conditions
- Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Loop - Actions
- Set PlayerString[(Integer A)] = <Empty String>
- For each (Integer B) from 1 to StringLength, do (Actions)
- Loop - Actions
- Set TempInt = (Random integer number between 1 and 32)
- Set PlayerString[(Integer A)] = (PlayerString[(Integer A)] + (Substring(Strings, TempInt, TempInt)))
- Loop - Actions
- Game - Display to (Player group((Player((Integer A))))) for 20.00 seconds the text: (Your String Is: + PlayerString[(Integer A)])
- Loop - Actions
- For each (Integer A) from 1 to 12, do (Actions)
- Events
I got my code with help from Komaqtion