*Edit: Created a toggle ability for each unit which allows you to specify which lane they will attempt to move towards at a switch point. I am effectively using this as a local variable for the unit. It also displays a buff on the unit allowing you to mouse over and check where they will be going at a switch point(which was a nice unintended side effect)
So basically instead of checking for an activated ability, it checks if the unit is being modified by a certain behavoir*
Greetings,
I am currently working on a DOTA style map. However, there are no champions, instead you control the movement of the units spawning down the lanes. The movement of the units is supposed to mimic a rail system, always going forward and not stopping(only to attack) and can only change paths on certain "swtich points".
I've ran into some fundamental problems which are really hurting me in the developement of the map, i feel the functionality exists but I am just unable to locate it.
Would some of the functionality show up is I created variables or flags in the data editor for the specific cases I need? I do not recall a space in the data editor for creating local variables for units *
1) Can I access local variables(preferably for a unit) other than during the trigger in which they are created?
basically need this for creating a pathing system, to check which point in the path they are at. Could also be helpful for other things*
Triggering unit enters within .5 of Point Top Lane 1
set variable previousPoint = Point Top Lane 1
2) How can I access the local unit group of a unit?(every trigger asks me for the name, which I cannot give since they are dynamically generated units)
moving waves of units looks tacky using a distance check or region enter, as they tend to fight over pathfinding space, could be prevented if I could give the order to the entire unit group instead of "triggering unit" 1 at a time.*
Any Unit belonging to player 1 enters region Region Bottom Lane Middle
Order Triggering Unit's Unit Group to attack point targetting Point Middle Lane Middle
3) How to check if a certain ability is currently activated?
the flags provided in the editor are very limited and mostly involve resources, I would like to check if an ability is currently toggled on, there is an "ability executing" flag, but have not had the opportunity to test it. All units have 3 standard abilities which toggle which lane they will go to after hitting a switch point*
1) Can I access local variables(preferably for a unit) other than during the trigger in which they are created?
No because Local variables are localized within that trigger. Global variables can be accessed from anywhere. Arrays might be helpful for your situation, so you don't need 23423423 global variables.
Quote:
2) How can I access the local unit group of a unit?(every trigger asks me for the name, which I cannot give since they are dynamically generated units)
- - - -Any Unit belonging to player 1 enters region Region Bottom Lane Middle
- - - -Order Triggering Unit's Unit Group to attack point targetting Point Middle Lane Middle
Changed into:
Any Unit belonging to player 1 enters region Region Bottom Lane Middle
Add units in region Region Bottom Lane Middle to unit group X
Order units in Unit Group X to attack point targetting Point Middle Lane Middle
Quote:
3) How to check if a certain ability is currently activated?
You could use the 'unit uses ability' event trigger as you said. It trigger's as soon as said ability is used.
Arrays wont really help me since the amount of units/groups of units is determined by how the game unfolds so there really is no way to track it.
Placing units into a new unit group as they enter might work, I would have to implement a delay for the final attack order, without one it would just reassign and reorder 1 at a time, just like the way it does now. It also made me think of placing a small region inside a larger region and once the first unit in the wave enters the smaller region I can send an issue to all units in the larger region to change direction(this would hopefully prevent some of the stuttering issues).
unit uses ability wouldnt help unless the unit was constantly using the ability, in this case the unit is simply responding to a toggle command. I actually have this working right now by having the toggle ability apply a buff, then checking if a unit has that buff behavior as it enters the region of the switch point. This lets me redirect units with single unit precision or large selection groups.
Thanks again for the input, think I have the basics of my original questions working desirably right now. I'm sure ill be back later with something else i broke(like the 4 hours it took me to figure out why an ability wasnt showing up in game, until i placed an empty behavior in it /wrist)
toggle ability apply a buff, then checking if a unit has that buff behavior as it enters the region of the switch point. This lets me redirect units with single unit precision or large selection groups.
wat about
event: any unit attribute changes
condition: if, triggering behavior = lane 1, then...
something along those lines seem more plausible?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
*Edit: Created a toggle ability for each unit which allows you to specify which lane they will attempt to move towards at a switch point. I am effectively using this as a local variable for the unit. It also displays a buff on the unit allowing you to mouse over and check where they will be going at a switch point(which was a nice unintended side effect)
So basically instead of checking for an activated ability, it checks if the unit is being modified by a certain behavoir*
Greetings,
I am currently working on a DOTA style map. However, there are no champions, instead you control the movement of the units spawning down the lanes. The movement of the units is supposed to mimic a rail system, always going forward and not stopping(only to attack) and can only change paths on certain "swtich points".
I've ran into some fundamental problems which are really hurting me in the developement of the map, i feel the functionality exists but I am just unable to locate it.
1) Can I access local variables(preferably for a unit) other than during the trigger in which they are created?
Triggering unit enters within .5 of Point Top Lane 1
set variable previousPoint = Point Top Lane 1
2) How can I access the local unit group of a unit?(every trigger asks me for the name, which I cannot give since they are dynamically generated units)
Any Unit belonging to player 1 enters region Region Bottom Lane Middle
Order Triggering Unit's Unit Group to attack point targetting Point Middle Lane Middle
3) How to check if a certain ability is currently activated?
If Set Path Middle == True/activated/on
Command unit down path towards middle lane
Thanks,
-Trenan
No because Local variables are localized within that trigger. Global variables can be accessed from anywhere. Arrays might be helpful for your situation, so you don't need 23423423 global variables.
- - - -Any Unit belonging to player 1 enters region Region Bottom Lane Middle
- - - -Order Triggering Unit's Unit Group to attack point targetting Point Middle Lane Middle
Changed into:
Any Unit belonging to player 1 enters region Region Bottom Lane Middle
Add units in region Region Bottom Lane Middle to unit group X
Order units in Unit Group X to attack point targetting Point Middle Lane Middle
You could use the 'unit uses ability' event trigger as you said. It trigger's as soon as said ability is used.
iE4TM4PS, I appreciate the response.
Arrays wont really help me since the amount of units/groups of units is determined by how the game unfolds so there really is no way to track it.
Placing units into a new unit group as they enter might work, I would have to implement a delay for the final attack order, without one it would just reassign and reorder 1 at a time, just like the way it does now. It also made me think of placing a small region inside a larger region and once the first unit in the wave enters the smaller region I can send an issue to all units in the larger region to change direction(this would hopefully prevent some of the stuttering issues).
unit uses ability wouldnt help unless the unit was constantly using the ability, in this case the unit is simply responding to a toggle command. I actually have this working right now by having the toggle ability apply a buff, then checking if a unit has that buff behavior as it enters the region of the switch point. This lets me redirect units with single unit precision or large selection groups.
Thanks again for the input, think I have the basics of my original questions working desirably right now. I'm sure ill be back later with something else i broke(like the 4 hours it took me to figure out why an ability wasnt showing up in game, until i placed an empty behavior in it /wrist)
-Trenan
wat about
event: any unit attribute changes
condition: if, triggering behavior = lane 1, then...
something along those lines seem more plausible?