• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

It's really random?

Status
Not open for further replies.
Level 8
Joined
Aug 13, 2018
Messages
338
What random means in "random number" in WE?
  • bug
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
I tested this 10 times and all of 10 times it got me this numbers:
10 10 8 7 6 8 8 7 6 1
Please check and tell me how can I solve this?
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,895
Oh, Thanks really.
But a question: How this option help us?
I say, what's its use?
The game generates a random number and doesn't change. Not sure why anyone would want to do for the majority of the time.

What random means in "random number" in WE?
  • bug
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
      • Game - Display to (All players) the text: (String((Random integer number between 1 and 10)))
I tested this 10 times and all of 10 times it got me this numbers:
10 10 8 7 6 8 8 7 6 1
Please check and tell me how can I solve this?
Really? What did you expect to happen? The game does what you told it to do. If you are expecting to generate a random number between x and y and that number can't be repeated more than once then that's a completely different story.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Oh, Thanks really.
But a question: How this option help us?
I say, what's its use?
I'm pretty sure most technology doesn't use "true randomness" because it's extremely difficult to recreate. Games like Wc3 use other means to create RNG. You can google around for more information on the topic because I don't really know the details.

Anyway, it's hard to see a use for "Uses Fixed Random Seed". Maybe when working on RNG skills like a triggered "Chance to Bash" for example. You could guarantee when the Bash will occur if you use a fixed seed since your tests will always give the same results. That could be useful for bug testing.

That being said you probably want to turn "Uses Fixed Seed" off.
 
Status
Not open for further replies.
Top