| 04-09-2004, 06:01 PM | #1 |
i want to make a map that is kinda like preschool showdown but different.... ^_^ now i have to make a trigger to: when a barracks is build, when it finishes it has to change color to player 9 i can do that but it has to spawn creeps that do an attack move i dont know how to do that can anybody say how or make a little axemple for me ? ^_^ plz reply.... |
| 04-09-2004, 06:19 PM | #2 |
You can do this with two triggers. Regioncounter is a variable of type integer. reig is an array variable of type region. Do this every time you create the new building. Set Regioncounter = regioncounter + 1 Set reig[Regioncounter] = (Region centered at (Position of (Last created unit)) with size (500.00, 500.00)) The spawn trigger would be Every 3 seconds For each integer A from 1 to region counter Create 1 some unit at reig[Integer A] If you dont understand just ask. |
| 04-09-2004, 06:32 PM | #3 | |
Quote:
where to be found ??? thx already for this.. |
| 04-09-2004, 07:10 PM | #4 |
First, do the region variable. Then when you set the variable, there should be an option to create a region centered at a point. Thats what you want. |
| 04-09-2004, 07:38 PM | #5 | |
Quote:
now i have to know how to connect it to the barracks...??? :( |
| 04-09-2004, 07:45 PM | #6 |
check my first post. After you make the barracks, put in the other commands from the first trigger. |
| 04-09-2004, 07:56 PM | #7 | |
Quote:
Initialization: set regioncounter = (regioncounter +1) set Reig[regioncounter] = (region centered at (position of (last created unit)) with size (500.00, 500.00) Spawn trigger: Event: Every 3 seconds Action: For each integer A from 1 to region counter Create 1 footman for player1(red) at reig[Integer A] they spawn at center of the map...??? how tho get them spawning at the barracks.. ( the barracks is builded in the game not from start...) |
| 04-09-2004, 08:12 PM | #8 |
NO no no no no!! Put that trigger where your trigger is where you change the color of the barracks. |
| 04-10-2004, 08:24 AM | #9 | |
Quote:
now I've got this: - Events: |---Unit - A unit enters (playable map area) |---Time - Every 3 seconds of game time - Conditions: |---(owner of(triggering unit)) equal to Player 1 (red) |---(unit type of(triggering unit)) equal to Barracks - Actions: |---set regioncounter = (regioncounter +1) |---set Reig[regioncounter] = (region centered at (position of (last created unit)) with size (500.00, 500.00) |---wait 10 seconds( is build time barracks) -|---For each integer A from 1 to region counter do Actions -|--Loop - Actions |--Create 1 footman for player 1 (red) at (center of reig([Integer A]) but there only spawns 1 footman... in the whole game...?? |
| 04-10-2004, 01:18 PM | #10 |
You keep on misinterpreting me, so i guess i can yell at you or anything. You want two seperate triggers. Here, let me show you... - Events: |---Unit - A unit enters (playable map area) - Conditions: |---(owner of(triggering unit)) equal to Player 1 (red) |---(unit type of(triggering unit)) equal to Barracks - Actions: |---set regioncounter = (regioncounter +1) |---set Reig[regioncounter] = (region centered at (position of (last created unit)) with size (500.00, 500.00) |---wait 10 seconds( is build time barracks) Events |---Time - Every 3 seconds of game time Actions: |---For each integer A from 1 to regioncounter do Actions |---Loop - Actions |---Create 1 footman for player 1 (red) at (center of reig([Integer A]) |
| 04-10-2004, 05:24 PM | #11 | |
Quote:
|
| 04-10-2004, 07:15 PM | #12 |
Or, you could do 1 trigger what would do the same these 2 triggers do like this: Event: Time - Every 3 seconds of game time Actions: Unit Group - Pick every unit in (Units of type Barracks) and do actions -Loop - Actions --If (All Conditions are True) then do (then Actions) else do (else Actions) ---If - Conditions ----((Picked unit) is alive) Equal to True ---Then - Actions ----Unit - Create 1 Footman for Player 1 (Red) at (Unit - Position of Picked Unit)) ---Else - Actions |
