Make a Basic Creep Spawn..?

cyber virus

New Member
Hi
How i make a basic Creep spawn? make them run in a straight line to the other side and attack a base?



Team 1 Team 2
|spawn|--------Tower1--------Tower1--------Tower2----Tower2------>|BASE|
|Base |<--------Tower1--------Tower1--------Tower2----Tower2------|Spawn|




Thank you if you help me! ^^
 
Werbung:

MeTaL GuArD

New Member
I usually make a region on each tower spot(if they aren't in a straight line) and do
Pick Every Unit in (Last Created Unit Group) and do Order - Attack on every region.
Also Unit Enters Region, pick every unit matching conditions(not sure on this one) and do actions, there repeat the attack move order. Should work, and if it won't i'll try to make a small map with it and inform you about anything.
 
Werbung:

edwinfong25

New Member
ok, so, i'd say that the easiest way to get this accomplished would be as MeTaL GuArD advised and to make a region on each side (essentially a decently sized region that would be large enough to encompass the area that all the spawns may take up as they spawn), this region shall be where the creeps are spawned

nextly, if that region is not close enough to the castle, then you can either make another region (this would be the target of the creeps' movement), or just find the position of the castle through triggers

so, now you'd have the spawning trigger (most likely Time - Periodic Event)
in that trigger you'd use "Unit - Create # <Creep Unit-Type> for <Player> at (Center of <Region>) facing Default building facing degrees"

so the number and creep unit and the (assumably) computer player who would possess them would be adjusted accordingly and to your needs
the Center of Region would need the region adjusted to the respective Creep Spawning Region that you had created
and the facing won't really matter since they'll turn once they start moving and/or attacking, lol

next, you'll need a trigger with Event "Unit - Unit Enters Region" (set the region to the spawning region as well)
add a condition to check Player Comparison, Owner of (Entering Unit) Equal to <the corresponding computer that should own the creeps that are spawning from that region>

then in the actions for that, you'd use "Unit - Issue Order Targeting Point"
and adjust it to: Unit - Order (Entering Unit) to Attack-Move To (Center of <the region to which the spawn should be attacking to OR the point that you'd specify (like position of unit with the unit being the castle>)

the creep spawning trigger can create units for both teams, just make sure that you adjust the spawn region, and owning computer as necessary
also you'd create two of the Unit Enters Region triggers (one for each region)
and they'd have pretty much the same actions except that they would reverse the spawn regions, the attack targets, the owning computers

and that should work :)
hope that helps :)
 
Top