• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Can you make a random generator?

Status
Not open for further replies.
Level 4
Joined
Jul 12, 2008
Messages
53
Does anyone know how to make a generator on JASS or GUI that can generate random things or rearrange things differently like units or regions or doodads anything like that. It seems hard but i don't think it's impossible....
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
make an integer variable, then a simple trigger:

  • Events
    • choose your event
  • Conditions
  • Actions
    • set <integer variable> = random number between 1 and 20
    • if <integer variable> = 1 then do action 1
    • if <integer variable> = 2 then do action 2
  • .....
that what you wanted? if not explain more detailed, the "20" is just an example
 
Level 8
Joined
Mar 20, 2007
Messages
224
I think he wants to create some kind of trigger which creates random units, doodads, buildings, and basic regional triggers, at random locations on the map.

I don't know why the heck you would want to, though.
 
Status
Not open for further replies.
Top