• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Need Info] Lanes and Waypoints

Status
Not open for further replies.
So I'm trying to create a system for units that spawn at a specific location to run along a specified pathway to eventually attack an end point. I have multiple lanes (Left, Right and Middle) so I'm trying to make units that spawn on the left to use the left lane, etc. Now normally I can just use a series of events and just tell them to attack-move to the next point until they reach destination, but I'm wondering if there isn't a more efficient way to do it.

I found a function called Lane Waypoint Add, which takes an integer and a point. I'm assuming the integer is the Lane's index, which is simple enough. However, I can't give the lane a direction, so I'm assuming it's strictly an AI thing, which may or may not be a bad thing. Having AI for units moving along a lane is a good thing for me because it can handle accidental idling (if a unit is stunned or whatnot).

If anyone knows how I can use lanes to do that, it would be tremendously helpful. In the event that I can't, does anyone know how I can get the event point from Unit -Any Unit Enters within LanePointDistance of Left_1? I played around with functions and made (hopefully) a function that takes the string number at the end of the point name, add 1 to it, and add that back to the string itself to get the next point. The problem is, even through Point is one of the parameters, I can't select the 'triggering point', as it were.

PS: Does sc2 not have hashtables?
 
Status
Not open for further replies.
Top