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

[Trigger] Loops - what and how?

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
Am creating a spawn system, much like the one in conflict of sereg map by panther-anthro.

  • Events
  • Unit - Building finish research
  • Conditions
  • Researched tech-type equal to Dummy_research_footman
  • Actions
  • Unit - create 2 Footman units for player red
  • Wait 60secs
  • Unit - create 2 Footman units for player red
  • Wait 60sec
  • Insert loop here!
So, I hear you speak of a trigger or something called Loop, I tried searching, but came with no results. So, loop, What and how?
 
Level 6
Joined
Feb 21, 2008
Messages
205
  • Events
  • Unit - Building finish research
  • Conditions
  • Researched tech-type equal to Dummy_research_footman
  • Actions
  • For each integer A from 1 to 10000, do actions
  • Unit - create 2 Footman units for player red
  • Wait 60secs
Didnt work like this, explain some more please! I would like to know why, and not just how.

Thanks though
 
Level 7
Joined
Mar 12, 2006
Messages
407
you have to add those actions in the loop - actions
ok if you have for each integer a from 1 to 10
it will run a loop 10 times
first time Integer A is 1
second time Integer A is 2
...
and so on
You can refer to the Integer in the loop but you dont need that for your action
you can use it to run that Unit - Create ... function as often as you want
 
Status
Not open for further replies.
Top