I want a unit spawned by an instant effect to move to the structure's rally point, is it possible? So far I think only units created by a Train ability or unloaded from a transport can do it. If its not possible then I'll have to make it a train ability and do some workaround because I want it to have autocast on and off.
It can probably work if the caster of the instant effect is the building itself, and the created unit inherits the move order from the instant effect. I don't have the editor opened right now, but I'd check the "rally point" ability and see how it gives the order to move units. There has to be an effect which assign a target according to where the rally point is, I'd start with searching for either an "issue order" ability being cast when the "load/unload" ability ends, and/or a parameter in the "load/unload" ability that inherits a parameter from the "rally point" ability.
What you could do is create an ability that creates a persistent effect, costs free, and is smart. Give that ability to the building but do not display it on the command card. Whenever you set the rally point(by right clicking the ground) it would create the persistent effect at target point.
Give the building the Create Unit ability, in the Create Unit effect, set the Effect- Effect Spawn to an Issue Order effect.
Your issue order effect, Ability set to Move, Index set to 0, set the Target: Target+ field to CreatePersistentEffect:Target Point.
You should be able to figure out how to set the rest of the fields to issue the order to the correct unit and whatnot.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want a unit spawned by an instant effect to move to the structure's rally point, is it possible? So far I think only units created by a Train ability or unloaded from a transport can do it. If its not possible then I'll have to make it a train ability and do some workaround because I want it to have autocast on and off.
It can probably work if the caster of the instant effect is the building itself, and the created unit inherits the move order from the instant effect. I don't have the editor opened right now, but I'd check the "rally point" ability and see how it gives the order to move units. There has to be an effect which assign a target according to where the rally point is, I'd start with searching for either an "issue order" ability being cast when the "load/unload" ability ends, and/or a parameter in the "load/unload" ability that inherits a parameter from the "rally point" ability.
That will be a little complicated...
the Rally Point is a Target Finds type.
What you could do is create an ability that creates a persistent effect, costs free, and is smart. Give that ability to the building but do not display it on the command card. Whenever you set the rally point(by right clicking the ground) it would create the persistent effect at target point.
Give the building the Create Unit ability, in the Create Unit effect, set the Effect- Effect Spawn to an Issue Order effect.
Your issue order effect, Ability set to Move, Index set to 0, set the Target: Target+ field to CreatePersistentEffect:Target Point.
You should be able to figure out how to set the rest of the fields to issue the order to the correct unit and whatnot.