• 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.

Random Groups

Status
Not open for further replies.
Level 3
Joined
May 30, 2008
Messages
32
Hi is it possible to make unit spawn in region using trigger like this

  • Unit - Create 1 a slime for Player 12 (Brown) at (Random point in Spawn a <gen>) facing Default building facing degrees
Instead of saying Create 1 a slime for player 12, it would be random group from Advance in World editor main page then Random Groups.

so far I've got this, but I can't find where it let u choose Option from Advance/ Random Groups from the main War craft editor. I just made this an example it wrong totally but just saying it not giving me no chance.

  • Unit - Create 1 (Unit-type((Name of (Random unit from (Random 1 units from (Last created unit group)))))) for Player 12 (Brown) at (Center of test region <gen>) facing Default building facing degrees

I know there is an Interger to make random spawn but Im not intresting in it. I'm intresting in using that advance, and random groups from that WE option.

If there a post about it go ahead link me please thank u very much.
 

EPW

EPW

Level 4
Joined
Feb 27, 2009
Messages
60
I have tried as well, what i did Zapper must have done twice over...so far nothing seems to work...(not that a really care for the answer)...just saying...this is a pain, so don't try if you don't know :p
 
Level 3
Joined
May 30, 2008
Messages
32
I found out that Random Groups is only made for pre place it in Tool Palet and there a question mark.


Anyway if anybody know how to make it work in trigger or maby possibly change it in Object Editor trick it into an Unit or something......

Thank you for reading it . It just probly made for pre placement only that it.
 
  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Randomness[1] = Footman
      • Set Randomness[2] = Knight
      • Set Randomness[3] = Rifleman
      • Set Randomness[4] = Mortar Team
      • Set Randomness[5] = Flying Machine
      • Set Randomness[6] = Gryphon Rider
      • Set Randomness[7] = Priest
      • Set Randomness[8] = Sorceress
      • Set Randomness[9] = Siege Engine
      • Set Randomness[10] = Spell Breaker
      • Set Randomness[11] = Dragonhawk Rider
      • Set Randomness[12] = Peasant
  • Create Random
    • Events
      • Player - Player 1 (Red) types a chat message containing -create as An exact match
    • Conditions
    • Actions
      • Unit - Create 1 Randomness[(Random integer number between 1 and 12)] for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Randomness is a unit-type array. Just add your own units in init and change the upper random number to how ever many unit types you have in your array.

EDIT:
And don't double post. Use edit like I have.

EDIT2:
You might get neg repped for it.
 
Last edited:
Level 3
Joined
May 30, 2008
Messages
32
Super sweet this work great. One thing that took me forever is finding out how to get this [(Random integer number between 1 and 12)]

So I just click everything I can find and found out it Math random number phew heh. Give u a rep!
 
Status
Not open for further replies.
Top