• 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.

Creep Spawning help

Status
Not open for further replies.
Level 2
Joined
Apr 26, 2005
Messages
19
Im looking for 2 things : Im not sure what to use for spawning creeps and exactly what makes them move towards a certain point. In my case the spawns are for a castle defense type map so i would need them to attack on the way to a certain area. Is what im looking for AI?


EDIT: Is this what im looking for?

Untitled Trigger 001
Events
Unit - A unit enters Region 005 <gen>
Conditions
Actions
Unit - Order (Ordered unit) to Move To (Random point in Region 006 <gen>)
 
Level 6
Joined
Dec 19, 2005
Messages
61
Untitled Trigger 001
Events
Unit - A unit enters Region 005 <gen>
Conditions
Actions
Set EnteredUnit = Event Response - Entering Unit
This will stop confusion with other units
Unit - Order (Entering Unit) As pointed out before, you were ordering the wrong unit event repsonse to Attack Move To This causes the unit to attack all enemy units en route (Random point in Region 006 <gen>)

Hope that helped.
 
Level 6
Joined
Mar 2, 2006
Messages
306
that's about it, but those stuff leak (dont ask questions here - there are enough topics about leaks on this site)...

here's what you're gonna do:

step one: in a separate trigger which runs at Map Initialization you prepare the points you'll use:
Set WavePoint[1] = (Center of Region 005 <gen>)
Set WavePoint[2] = (Center of Region 006 <gen>)
etc.

step two (creating units):
Unit - Create 3 Footman for Player 6 (Orange) at WavePoint[1] facing 0.00 degrees
Custom script: call GroupPointOrderLocBJ( bj_lastCreatedGroup, "attack", udg_WavePoint[2] )

etc... (two more groups for two more paths)
About the jass part, just trust me on that one, ok? Paste it inside and don't ask silly questions until you have a written proof that you've read all abour leaks on wc3sear.ch and the-helper.net...

step three: making them turn when they reach half-way:
Code:
Trigger:AttackOrderTwoHumanSide
    Events
        Unit - A unit enters Region 006 <gen>
        Unit - A unit enters Region 008 <gen>
        Unit - A unit enters Region 010 <gen>
    Conditions
        (Owner of (Entering unit)) Equal to Player 6 (Orange)
    Actions
        Unit - Order (Entering unit) to Attack-Move To WavePoint[9]

piece of cake! 8)
 
Level 6
Joined
Mar 2, 2006
Messages
306
one step at a time, my friend...

couple of months ago, i knew nothing about leaks, although i'm a programming junkie and a decent mapper...

i learned, thanks to the guys here and at the-helper...
hopefully, so will he.

then, he will probably see that his maps disconnects clients (server-splitting issue). with a bit of determination, he will learn how to resolve that too.

that is how you learn to make great maps - one step at a time... 8)
 
Level 6
Joined
Feb 18, 2005
Messages
263
the time loss is way smaller, if you use a variable instead of a functian that returns the value you want to use.

there are way less pointers the programm has to follow, therefore it's faster.


so i got used to store all those event-response-get*-functions in local vars, using them during my whole function. that has 2 advantages:
1st - its faster
2nd - its easier to read

and for leaking - even with waits in the inbetween i can still use my own var...
 
Status
Not open for further replies.
Top