I am working on a MOBA type map. I want to be able figure out which lane a unit belongs to.
One solution I have considered is using the unit custom value to store the lane number. After a unit is created I would set the custom unit value of last created unit to its lane number, then I would check this number whenever I needed to know the lane.
Another solution I have thought of is a set of custom units for each lane that are identical in stats. If I wanted to spawn footmen, I would have a separate custom footman for each lane. (Footman1, Footman2, ...). This is definitely too much work and unnecessary.
I know this is something that can be accomplished using hashtables but most tutorials on hashtables talk about multi unit instantiable spells. Maybe a less complex tool would be better suited for something simple like my problem. Is this something hashtables were meant to deal with?
What is the most simple, efficient way to give a unit a lane number when it is created?
One solution I have considered is using the unit custom value to store the lane number. After a unit is created I would set the custom unit value of last created unit to its lane number, then I would check this number whenever I needed to know the lane.
Another solution I have thought of is a set of custom units for each lane that are identical in stats. If I wanted to spawn footmen, I would have a separate custom footman for each lane. (Footman1, Footman2, ...). This is definitely too much work and unnecessary.
I know this is something that can be accomplished using hashtables but most tutorials on hashtables talk about multi unit instantiable spells. Maybe a less complex tool would be better suited for something simple like my problem. Is this something hashtables were meant to deal with?
What is the most simple, efficient way to give a unit a lane number when it is created?