[Originally posted on TeamLiquid. Was adviced to come here.]
Okay, after working a lot the last few hours I've finally managed to create arrows on the map, detailing a route (see Kerrigan in The Moebius Factor, the trains in The Great Train Robbery, etc). However, when they appear, they all appear simultaniously, instead of beginning at point 01 and moving to the last one, as they do in the Blizzard maps. How can I correct this?
Here is the path creation trigger [shortened]:
Variable - Set Path01[PathIndex] = APC 01 - 00
Variable - Set PathIndex = (PathIndex + 1)
Variable - Set Path01[PathIndex] = APC 01 - 01
Variable - Set PathIndex = (PathIndex + 1)
Variable - Set Path01[PathIndex] = APC 01 - 02
Variable - Set PathIndex = (PathIndex + 1)
Variable - Set Path01[PathIndex] = APC 01 - 03
Variable - Set APC 01 Path Length = PathIndex
PathIndex: Integer variable set to 0.
Path 01: Point variable set to no point.
APC 01 - 00 to 11: The points on the path.
And here is the arrow creation trigger:
General - For each integer PathIndex from 0 to APC 01 Path Length with increment 1, do (Actions)
Actions
Ping - Create a ping for (All players) at Path01[PathIndex] (using point facing), using model Ping Arrow and color (100%, 0%, 0%, 0%), lasting 6.0 seconds
Ping - Set scale of (Last created ping) to 0.75
Visibility - Reveal (Region(Path01[PathIndex], 7.0)) for player 1 for 6.0 seconds and Do Not check cliff level
Actually, it was the Blizzard maps that got me this far. I can't seem to figure out what it is that they do. It's extra difficult because of the large number of triggers used.
ok I looked in the map THorner01, which is the map with the trains that you have to kill. and they show the direction the train will be taking with arrows, after each ping there is a wait of 0.1seconds, so that they don't happen all at once
this is the code they use, they use a for loop that goes through each of the points and after creating the ping they have the wait before going back through the loop for the next one
Okay, but I do have another question now. The second arrow path seems to not work. I get an in-game message stating "Error: Trying to access an element past an array" (paraphrased). I find that odd, as I copied the trigger from arrow 01 (which worked), and then used new variables and new points.
[Originally posted on TeamLiquid. Was adviced to come here.]
Okay, after working a lot the last few hours I've finally managed to create arrows on the map, detailing a route (see Kerrigan in The Moebius Factor, the trains in The Great Train Robbery, etc). However, when they appear, they all appear simultaniously, instead of beginning at point 01 and moving to the last one, as they do in the Blizzard maps. How can I correct this?
Here is the path creation trigger [shortened]:
PathIndex: Integer variable set to 0. Path 01: Point variable set to no point. APC 01 - 00 to 11: The points on the path.
And here is the arrow creation trigger:
On the blizzard map that has the arrows, why don't you have a look yourself? you can open up the campaign maps
I would imagine it has waits in between the showing of each arrow
@nevjmac: Go
Actually, it was the Blizzard maps that got me this far. I can't seem to figure out what it is that they do. It's extra difficult because of the large number of triggers used.
@DanteStarcraft: Go
post your code.....
it sounds like your creating all the arrows at the same time...
what you might want to do is use a "wait for time" or "wait for condition" while loop
ok I looked in the map THorner01, which is the map with the trains that you have to kill. and they show the direction the train will be taking with arrows, after each ping there is a wait of 0.1seconds, so that they don't happen all at once
this is the code they use, they use a for loop that goes through each of the points and after creating the ping they have the wait before going back through the loop for the next one
@nevjmac: Go
It works now, thank you so much! The irony is: I saw that waiting action, and had no idea what it was for. :)
No problem :) marking this as solved
@nevjmac: Go
Okay, but I do have another question now. The second arrow path seems to not work. I get an in-game message stating "Error: Trying to access an element past an array" (paraphrased). I find that odd, as I copied the trigger from arrow 01 (which worked), and then used new variables and new points.
that to me sounds like your second path is trying to access a part of an array larger than the array is.
can you post the code and relevant variables?
@nevjmac: Go
EDIT: Never mind, I figured it out.