• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Truly Random Events [creating a building at random point]

Status
Not open for further replies.
Level 2
Joined
Sep 21, 2007
Messages
9
Ok so basically I'm working on a map, and what I want to do, is at the game creation create a particular building for each player at a random point on the map. The simple way would be to place one for every player in a random point in the playable map area, but that places them in the same place on every game creation, though appearing to be random at first glance. I'm looking for a way to make it truly random where the player start points are placed
 
Level 9
Joined
Feb 19, 2006
Messages
115
That's just a thing with the world editor, Go to File -> Preferences -> Test Map, and uncheck the box that says "Use Fixed Random Seed" to turn it off.

Also, if you create the building with cinematic mode turned on, it de-randoms it 'for consistency' in cinematics. If that's the case, add this to your trigger:

  • Set X = (Random integer number between -1000000000 and 1000000000)
  • Cinematic - Turn cinematic mode On for (All players)
  • Custom script: call SetRandomSeed( udg_X )
(X is an integer variable btw)
 
Last edited:
Status
Not open for further replies.
Top