How random

smileyguyx

Member
Reaction score
1
How do you make a random spawn of units? As in after a few seconds into the game you can randomly get spawned Unit A, B, C etc?
 

CuteCumber

Member
Reaction score
4
Setup your desire unit into variables with array for your desire unit. Set it either in map inilization or the starting of the game. Example:
Creep[1]: Spider
Creep[2]: Wildkin
Then your trigger will be something like

every x second

Unit - Create n number of Creep[Random number between a and b] at y point facing default building facing.
 

hopy

Active Member
Reaction score
64
How do you make a random spawn of units? As in after a few seconds into the game you can randomly get spawned Unit A, B, C etc?

Trigger:
  • Begin
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set Unit[1] = Footman
      • Set Unit[2] = Dark Troll
      • Set Unit[3] = Spider
      • Set Unit[4] = Dragon

Trigger:
  • Round End
    • Events
      • Every 5 seconds of Game time
    • Conditions
    • Actions
      • Set Point = Center of Region001 <gen>
      • Create 5 Unit[Random number from 1 to 4] at Point facing default unit facing angle.
      • Custom script: call RemoveLocation (udg_Point)


100% hand typed. xD Ignore all the spelling mestakes and stuff, and I don't think the custom script was right... but it should be ok if you'd remake it normally.
Edit: Nvm, I copied the custom script anyways. xD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top