• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[AI] I need some help with Triggers

Status
Not open for further replies.
Level 1
Joined
Jan 14, 2008
Messages
7
Hey im trying to make a map where you can build a building and it will auto send units,
Anyone know how to make these? i used to know how to but its been ages since ive done it so yeah :)
any help will be appricated
 
Level 4
Joined
Dec 7, 2010
Messages
62
How about making a trigger that spawns units at the position of your building and then just order them to move to where-ever you want them to go?

This requires that you make a new variable (point) and then set the variable to the point of your building. Then make a new trigger with the event "Every (your time) seconds" and as Action you just create units at the variable point.

When they are spawned, clear the point (by making a custom script call RemoveLocation(udg_your-variable-name). Now set the variable to a new point (the place you want your units to go to) and make a action that orders the units to move to the variable point.

Once again, when they have moved, clear the variable to it can be used again.
I hope you understand how I mean :) If not, PM me and I'll show you by
  • tags.
 
Level 4
Joined
Nov 24, 2009
Messages
76
yeah im trying to save it :p its wont tell me its always opening :)
so this should have the triggers in it ?:D

Wow... im so confused....
this is alot of info, you have a real skill here mate:vw_wtf:

Mckill2009 i understand parts of this such as the defeat condition, but the spawn i dont understand at all, i will inport it into my map and see if it works :D

Mckill2009 i understand parts of this such as the defeat condition, but the spawn i dont understand at all, i will inport it into my map and see if it works :D

I was unable to get them working. is it possible for me to send you my map beta, and you could try to put triggers onto it.
this is providing to be alot of trouble :) basicly i want the baracks on the human side to auto build a unit if its not already doing it, same with the graveyard on the zombie side
 
Last edited by a moderator:
Level 4
Joined
Nov 24, 2009
Messages
76
at super good, the whole thing preety much, i need the fastest possible system with the less lag, basicly i can figure out how to trigger a building to build a unit then attack move that unit to the enermy base.
i dont want the unit to just spawn, i want it to be built.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
In that case you just order the building to build the unit (I believe you issue the unit type ID to the building to start the unit). You should have this eithor on the unit finishes training event or as a perodic event to assure continious building.
When the building finishes training a unit (event), order the trained unit to attack move to some position (you choose where that position is).
 
Status
Not open for further replies.
Top