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

Unit Spawn - 1 at a time

Status
Not open for further replies.
KINDA SOLVED
I Managed to kinda solve it myself, although, can someone please check it and see if it looks alright, would be really nice of you! +rep

Requesting someone to have a look once again - 090525

Requesting help again - 090530

Requesting help again - 090531

Requesting help again - 090601

--------------------------------------
---- Solved trigger: Look at post 2 ----
--------------------------------------

  • Events
  • Time - Timer Expires
  • Conditions
  • Actions
  • ---------- 1 Unit Spawn ----------
  • Set Point1 = (Center of Spawn 1 <gen>)
  • Unit - Create 1 Levels_Units[1] for Player 11 (Dark Green) at Point1
  • Custom script: call RemoveLocation(udg_Point1)
  • Set Point3 = (Center of Loselife <gen>)
  • Unit - Order (Last created unit) to Attak-Move To Point3
  • Custom script: call RemoveLocation(udg_Point3)
  • ---------- 2 Unit Spawn ----------
  • Set Point2 = (Center of Spawn 2 <gen>)
  • Unit - Create 1 Levels_Units[1] for Player 11 (Dark Green) at Point2
  • Custom script: call RemoveLocation(udg_Point)
  • Set Point3 = (Center of Loselife <gen>)
  • Unit - Order (Last created unit) to Attak-Move To Point3
  • Custom script: call RemoveLocation(udg_Point3)
  • Wait Creepspawn_Time seconds
There, my trigger.. Now for my question(s):

I want 60 creeps to charge my ass in a loop for a minute.
One creep spawn and attack-move each second, all the way to next round.

1 thing works tho, if I copy the triggers for each damn unit, BUT seriusly, I cant have this trigger for each unit..
It would be like; 40 levels * 60 units /level = 2400 triggers to copy.. XD

How can I do this? I have scratched my head for hours now, hair is falling off..
Help me before I lose all my hair.. :hohum:


Btw, the map is like Enfo, that's why I have Spawn1 & Spawn2
 
Last edited:
VARIABLES:
Point1 - Point -none
Point2 - Point -none
Point3 - Point -none
Point4 - Point -none
Lose_Life - Region - none
Levels_Units - Unit-Type Array (1) - none
Creepspawn_Time - Real - 0.95
Timer - Timer - New Timer (Deafult)
TimerWindow - Timer Window - none
Units_Count - Integer - 0 (Deafult)

Trigger: TimerCreate

  • Events
  • Time - Elapsed game time is 0.02 seconds
  • Conditions
  • Actions
  • Countdown Timer - Create a timer window for Timer with title Next Level in:
  • Set TimerWindow = (Last created timer window)
  • Countdown Timer - Start Timer as a One-shot timer that will expire in 10.00 seconds.
  • Player Group - Pick ever player in (All players) and do (Countdown Timer - Show TimerWindow for (Picked player))
  • Custom Script: set bj_wantDestroyGroup = true
  • Trigger - Turn off (This trigger)
Trigger: Creep Initialization

  • Events
  • Map Initialization
  • Conditions
  • Actions
  • --- Unit type Spawns ---
  • Set Levels_Units[1] = Barbed Arachnathid
  • Set Levels_Units[2] = Bandit
  • Set Levels_Units[3] = Centaur Archer
  • --- Unit amount spawns ---
  • Set Units_Count = 60
Trigger: Creepspawn Level 1

  • Events
  • Time - Timer expires
  • Conditions
  • Actions
  • Countdown Timer - Destroy (Last created timer window)
  • Countdown Timer - Create a timer window for Timer with Next Level in:
  • Set TimerWindow = (Last created timer window)
  • Countdown Timer - Start Timer as a One-shot timer that will expire in 70.00 seconds
  • Player Group - Pick ever player in (All players) and do (Countdown Timer - Show TimerWindow for (Picked player))
  • Custom script: set bj_wantDestroyGroup = true
  • For each (Integer A) from 1 to Units_Count. do (Actions)
  • Loop - Actions
  • --- Spawn A ---
  • Set Point1 = (Center of Spawn 1 <gen>)
  • Unit - Create 1 Levels_Units[1] for Player 11 (Dark Green) at Point1 facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Point1)
  • Set Point3 = (Center of Loselife <gen>)
  • Unit - Order (Last created unit) to Attack-Move To Point3
  • Custom script: call RemoveLocation(udg_Point3)
  • --- Spawn B ---
  • Set Point2 = (Center of Spawn 2 <gen>)
  • Unit - Create 1 Levels_Units[1] for Player 11 (Dark Green) at Point2 facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Point2)
  • Set Point4 = (Center of Loselife <gen>)
  • Unit - Order (Last created unit) to Attack-Move To Point4
  • Custom script: call RemoveLocation(udg_Point4)
  • Wait Creepspawn_Time seconds
  • ------------
  • Trigger - Turn on Creepspawn Level 2 <gen>
  • Trigger - Turn off (This trigger)
The trigger Creepspawn Level 2 is exactly as 1, only changed [1] to [2] and stuff

It works excellent, but I have a feeling that something is missing XD
Maybe a memory leak somewhere, easier for others to see others problems..
 
Status
Not open for further replies.
Top