Warcraft III resources & community, 2003–2006 · archived

[Trigger help] AOS unit spawn and upgrade help please

6 posts
#1

[Trigger help] AOS unit spawn and upgrade help please

Im making an AOS style game and I need some help with unit spawning triggers.

The kind of issue im having is kind of complicated. My map is not going to feature normal unit spawns like most AOS style games like DotA.

Im trying to make it so you have to make a one time purchase of the unit with your hero of the unit you want to produce at the barracks and then it will keep on producing that unit + others purchased from there on.

and also the same for upgrades on creeps too.

So basically:
1. a hero walks upto the barracks
2. a selection arrow appears over the heroes head
3. click on barracks
4. barracks displays units for sale
5. once unit is purchased, the unit BTN either disappears, or is replaced by next level unit BTN.
6. once unit is purchasedbarracks starts producing unit at regular intervals with the rest of the units for the AI player on that team.

and:
1. a hero walks upto blacksmith
2. selection arrow appears over the heroes head
3. click on blacksmith
4. blacksmith displays upgrades for sale
5. once upgrade is purchased, upgrade BTN either disappears or is replaced by next level upgrade option.
6. once upgrade is purchased, the upgrade is now installed on all future and existing units for AI player on that team.

can anyone help me with this?
#2
unit is bought

blah blah

all those obvious events and conditions

Set numFooties = numFooties + 1


(sometime later on, in a different trigger)

For each integer a from 1 to numFooties
Create 1 numFooties at ANTILEAK, etc, etc
Order Last Created Unit to Attack to ANTILEAK2
#3
Could you be more specific dude?

Here is my trigger so far:

Events
Time - Elapsed game time is 60.00 seconds (I know this part is wrong, I am trying to put a 60 second delay before the trigger starts)
Time - Every 30.00 seconds of game time
Conditions
(Barracks 0167 <gen> is alive) Equal to True (for this section: is there any way to make it a general condition? meaning instead of having to write a trigger for each building in each spawn point, is it possible to create a condition that reads something like "If unit is a Barracks equal true equal to alive" if so could you helpme with the path?)
Actions
Unit - Create 2 Footman for Player 1 (Red) at (Position of Barracks 0167 <gen>) facing 90.00 degrees
Unit - Create 1 Rifleman for Player 1 (Red) at (Position of Barracks 0167 <gen>) facing 90.00 degrees
#4
Pick every unit of type Barracks matching Life of Picked Unit > .405 and do Actions
Loop - Actions
set loc = Position of (Picked Unit)
Unit - Create 2 Footmen at loc

would answer that qn.
#5
what point in having a point variable if you don't delete it? You might as well just do
Unit - Create 2 Footmen at (Position of (Picked Unit))
#6
Thats implied...