• 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] Kind of confused with this trigger

Status
Not open for further replies.
Level 7
Joined
Dec 8, 2005
Messages
319
ok so here is what i am trying to accomplish.

I have 3 lanes with 2 teams of 3 players. Each team has one building in each lane. So there are 3 buildings per team in each lane.

the idea of the game is to build buildings that spawn units every X seconds to kill the other team. this is the problem i am having. i need a trigger that will set check to for building X and spawn units and send them to the correct lane.

so for example. lane 1. red makes a factory to spawn units. if the building is to make tanks. then i would need a trigger that would check that it is in lane 1 and need to spawn a tank and move it to the other side of lane 1.

i could make the trigger to check for player1 only and make like 50 triggers. but since there are 3 players in 1 lane across 3 lanes. i cant simply
Set PlayerNumber[1] = Player 1 (Red)
and i am having no luck setting the buildings into a player group. any ideas guys... this one is killing me. and i am honestly looking to make a few triggers with a loop to determine everything.
 
Level 7
Joined
Dec 8, 2005
Messages
319
haha hey ghostwolf... not sure how i would do this in gui much less jass. still reading. but there is no simpler way to do this using arrays.

like pick every unit in unit group IntegerA
and then loop and make the if/then/else
i can do it for each section but would rather make 1 trigger and be done with it.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Its not as complicated as you think in gui.
Make a region over the lane and then
  • Event: unit - A unit enters Region <x>
  • Condition:
  • Actions: If/then/else
  • If (unit type of (Entering Unit) is x [tank e.g.]) then
  • Order (entering unit) to Move to Region <y>
Whereas Region y is your defined target lane

If i undestood you right...
 
Level 7
Joined
Dec 8, 2005
Messages
319
no squiggy... i can do that... and that is very easy to make a movement trigger. but i was looking to make a trigger that would use a simple loop system to go though an array to pick what buildings are on the map and thus spawn a specific unit and move to the correct region. your way = 6 times the triggers just to move them and another 6 long triggers to check for buildings and then spawn units.

I am just looking for an easy way to take down how many and how long my triggers normally are. but thanks alot squiggy for the help =D
 
Level 7
Joined
Dec 8, 2005
Messages
319
ah never mind guys... i got the trigger made... i was tring to use a loop and just was not working... i really dont think you can unless i was missing something and i had to break down each lane seperately... so now this saved me so time... or well effort more or less... and fyi ghost... this is for a new map... lol i just got what you were asking.
 
Status
Not open for further replies.
Top