• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Very noobish triggeriring help... or variables if you prefer

Status
Not open for further replies.
Level 2
Joined
Apr 28, 2005
Messages
25
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?

Thanks guys :D
 
Level 5
Joined
Jun 17, 2006
Messages
114
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.
 
Level 2
Joined
Apr 28, 2005
Messages
25
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.

Thanks for the help tho guys :)
 
Level 2
Joined
Aug 7, 2006
Messages
13
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?
 
Level 2
Joined
Apr 28, 2005
Messages
25
Thanks for all your help guys. I suck at variables, but I'll spend a weekend trying to get this all organized and stuff.

Look for my map (the very first one I plan to finish 100%) Siege Of The Undercity.

Thanks again for your help :D
 
Level 8
Joined
Feb 10, 2006
Messages
466
the array size does nothing whatsoever, just so u know ^^

untitled1dn9.png

^--------------- sets array elements to default values

It may be nothing with integers, but adding units to null groups might cause troubles.
 
Status
Not open for further replies.
Top