Warcraft 3 documentation
vJASS & Zinc Documentation
For the latest documentation about how it works vJASS and Zinc language layers for Warcraft III, please follow these links:
Jasshelper documentation - Zinc documentation - WC3 Optimizer documentation
This topic is the discussión abut the function SetRandomSeed. You can see all the information about this function keyword HERE.

[functions] SetRandomSeed No New Posts Jassdoc

Started by
City17

0 Members and 1 Guest are viewing this topic.

[functions] SetRandomSeed
on: February 23, 2022, 01:27:17 PM

sets the internal PRNG's seed.

Useful for testing or when you want a repeatable outcome. WorldEdit has an option to run test maps with a fixed seed, you can achieve the same result with this.
Code: [Select]
SetRandomSeed(42)
GetRandomInt(0, 18) --> 12
GetRandomInt(0, 18) --> 2
SetRandomSeed(42)
GetRandomInt(0, 18) --> 12

Desyncs! The random number generator is a global, shared resource. Do not change its state in local blocks asynchronously.

See: GetRandomInt, GetRandomReal
« Last Edit: February 26, 2022, 04:37:35 PM by City17 »



 

Started by moyack

Replies: 3
Views: 3843
Jassdoc

Started by Jedi

Replies: 5
Views: 14426
General Jass Discussion

Started by moyack

Replies: 40
Views: 57372
Jass Theory & Questions

Started by moyack

Replies: 0
Views: 418
Jassdoc

Started by moyack

Replies: 0
Views: 429
Jassdoc
Vivir aprendiendo.co - A place for learning stuff, in Spanish   Chaos Realm - The world of Game modders and wc3 addicts   Diplo, a gaming community   Power of Corruption, an altered melee featuring Naga and Demon. Play it now!!!   WC3JASS.com - The JASS Vault + vJASS and Zinc   Jetcraft - A Starcraft II mod   WormTastic Clan (wTc)   Warcraft RESOURCES Reforged: Modelos, mapas, proyectos y mas...