Strilanc
Veteran Scripter
- Reaction score
- 42
I'm trying to give units attack-move orders as they are trained, based on whether or not a behavior is present.
So I have this trigger:
There are several levels of problems I'm running into:
- The condition is never satisfied. Even by units with the AutoPath behavior.
- When I disable the condition, I get a debug error which makes it look like the created unit *has no owner either*.
- Changing the trigger to work on 'enters region' results in the same errors with triggering unit.
Now, obviously I'm missing something pretty basic here. It looks like I'm checking the properties of the null unit or something, except that the unit *does* get ordered (to the wrong place because of the default result from PlayerGroupHasPlayer, but ordered!).
So what the heck is going on here?
So I have this trigger:
Trigger:
- AutoPath
- Events
- Unit - Any Unit creates a unit with Any or Any
- Local Variables
- Conditions
- ((Created Unit()) has AutoPath) == true
- Actions
- SetupUnitPath((Created Unit()), ((Owner of (Created Unit())) is in Teams[0]))
- Events
There are several levels of problems I'm running into:
- The condition is never satisfied. Even by units with the AutoPath behavior.
- When I disable the condition, I get a debug error which makes it look like the created unit *has no owner either*.
Code:
Trigger Error in 'gt_AutoPath_Func': Parameter out of bounds in PlayerGroupHasPlayer [value: 16, min: 0, max:15]
Now, obviously I'm missing something pretty basic here. It looks like I'm checking the properties of the null unit or something, except that the unit *does* get ordered (to the wrong place because of the default result from PlayerGroupHasPlayer, but ordered!).
So what the heck is going on here?