Very noobish triggeriring help... or variables if you prefer
Is there any other way, in an AOS map, to have units attack move on a set path (that twists and turns, i set multiple regions so the units don't hug the inside of the path and make it look ugly), without using so many triggers? As in, I mean copying the "attack move" to region trigger and copying and pasting it alot.
I here you can do this with variables. Is this true?
since no one has answered yet and your post has been up for almost an entire day i suppose i should tell you that no, i don't think there is any way to get around this. it's annoying and mind-numbing work to create pathing AIs but in order to make a good map you'll have a lot of such mind-numbing work to do alongside the really creative and rewarding stuff.
Oh, ok. I don't mind making the triggers, it's just when playing a new game a friend made. (it was kind of like tech wars) he said he made the unit movement with variables, so I was wondering how to do that, and possibly avoid the lag.
There is a way to use less triggers. It involves region arrays.
I don't have access to the editor at the moment so I'll just give you a basic idea for now. I'm in the process of moving, so give me a few days and I can give you a real example of what I'm trying to say.
But for now, here's a blind attempt:
This is assuming there is only 1 path.
You create your array, rgnPath, for example. Set it to a X (where X is the number of regions in the pathing) value array.
Then you make a simple trigger to declare the variables in your array.
Map Initialization
Set rgnPath(1) = Out of Spawn Region Set rgnPath(2) = First turn Region Set rgnPath(3) = Second turn Region Set rgnPath(4) = End Zone Region Etc.
Note: I have no idea how your pathing is laid out, this is just a crude example I came up with on the spot.
With your Array now declared you can make your trigger.
It would be something like this:
Whenever a unit owned by Player Y(Owner of the creeps) enters rgnPath(1) Whenever a unit owned by Player Y(Owner of the creeps) enters rgnPath(2) Whenever a unit owned by Player Y(Owner of the creeps) enters rgnPath(3) Whenever a unit owned by Player Y(Owner of the creeps) enters rgnPath(4) etc.
For Integer A = 1 to X (X is the number of regions in your array) And this is where my lack of World Edit shines through.
If *Region unit is in* = A Then Unit - Order triggering unit to AttackMove to rgnPath(A + 1)
And that's pretty much it. Basically what this does is: The For statement loops through each region in the arrya to compare it to where the unit is, this allows you to determine where the unit is; rgnPath(A), therefore where to tell it to go from here. You want it to goto the next region in the array so you order it to move to A + 1. Easy, right?
what i MEANT ( maybe not clear enuff ) was that an Array defined in the Globals ( GUI ) variable editor takes a size. Unlike most programming languages, the map just ignores the size that you put in, and i was pointing that out
try opening a war3map.j with a global array in it sometime x.x