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

Spawn? Spawn!

Status
Not open for further replies.
Level 9
Joined
Mar 31, 2011
Messages
496
I need opinion from you guys, I don't know which is better spawning system for a hero arena. Here are two system:
  • Level 1 Creeps
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 1 Poring for Neutral Hostile at (Random point in SpawnArea1 <gen>) facing Default building facing degrees
Which, every 30, the creeps, changes. Not always poring, so I used elapsed game time.
<[(OR)]>

  • Creeps
    • Events
      • Time - Every 30.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 5 Murloc Nightcrawler for Neutral Hostile at (Center of SpawnArea1 <gen>) facing Default building facing degrees
      • Unit - Create 5 Mud Golem for Neutral Hostile at (Center of SpawnArea2 <gen>) facing Default building facing degrees
      • Unit - Create 5 Timber Wolf for Neutral Hostile at (Center of SpawnArea3 <gen>) facing Default building facing degrees
      • Unit - Create 5 Brigand for Neutral Hostile at (Center of SpawnArea4 <gen>) facing Default building facing degrees
Not exactly like this, but, I think most of hero arena uses this kind of spawn system like in FoC or BvO
 
Last edited by a moderator:
<[OR]>
  • T
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set UnitTypes[1] = Footman
    • Set UnitTypes[2] = Knight
    • Set UnitTypes[3] = Scarab
    • Set Integer = 1
  • Tr
  • Events
    • Time - Every 30.00 seconds of game-time
  • Conditions
  • Actions
    • For each (Integer A) from 1 to 5, do (Actions)
      • Loop - Actions
        • Set Point = (Random point in (Playable Map Area))
        • Unit - Create 1 UnitTypes[Integer] for Neutral Hostile at Point facing Default facing degrees
        • Unit Group - Add (Last created unit) to CreepGroup
        • Custom script: call RemoveLocation (udg_Point)
  • Tri
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) is in CreepGroup) Equal to True
  • Actions
    • Unit Group - Remove (Triggering unit) from CreepGroup
    • If (All conditions are true) then do (Actions) else do (Actions)
      • If - Conditions
        • (Number of units in CreepGroup) Equal to 0
      • Then - Actions
        • Set Integer = Integer + 1
      • Else - Actions
 
Last edited:
Level 9
Joined
Mar 31, 2011
Messages
496
oh... thanks! I'll try using that!

btw, what are the variables you use? :smile:

and I have 6 Spawning areas.
 
Level 1
Joined
Apr 17, 2011
Messages
4
i dont understand the from each integer A thing. ive never understood this trigger. can someone shed some light?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Its a crap GUI way to do for loops.

A for loop basically will incriment/decriment a counter (integer) through a certain range and for each value execute some code.
Useful for running though arrays or for running code a certain number of times.

Avoid spawning units ontop of eachother, the WC3 displacement algorthim is quite slow and you can easilly cause frames to be skipped creating units ontop of each other.
 
Status
Not open for further replies.
Top