1) Create a Apply Behavior effect, applies a behavior we will call Force Unsiege.
2) The behavior will have the flag Uncommandable set (so they can not stop the order to unsiege).
3) Create a validator for unit type (comparing it to the unit the unit will morph into, in this case, a Siege Tank). Place this validator in the behavior remove field, so the behavior is destroyed when the unsiege is complete.
4) The behavior will have an initial effect of an Issue Order effect, ordering in the unit to unsiege.
If you wish to extend this to any other unit, you will need to create a switch effect, and use a validator for each case, checking if the unit has a particular ability, and then doing an issue order effect accordingly. The validator will also have to be a combine of all possible morphs (Phase Prism, Siege Tank, etc.).
If you are using a buff as ArcaneDurandel suggests, make sure, it is actually applied. Otherwise, make sure the effect is executed on the correct unit. Check, if you can issue the order manually, or if it is blocked by any means (requirement, stun behavior, w/e). Check the issue order effect, the Player field has to point to the current owner of the unit, or the issue order won't work (for a behavior, this would probably be source, otherwise target). Also obviously, the unit has to be the correct one as well (again, source for a behavior, otherwise target).
Uncommandable i thought made it so your unit could not use abilities?
Afaik thats what Disable Abilities is for :D. Uncommandable should prevent orders given to the unit by a player and via trigger, but orders issued by effects should still go through. You might want to check with the flag disabled to make sure, though, maybe it changed at some point.
Lets use Snipe as an example. If it is launched on a sieged Siege tank or Warp Prism , the effect forces them to unsiege. How can that be done?
Try an Issue Order effect.
To absoultely force the unsiege
1) Create a Apply Behavior effect, applies a behavior we will call Force Unsiege.
2) The behavior will have the flag Uncommandable set (so they can not stop the order to unsiege).
3) Create a validator for unit type (comparing it to the unit the unit will morph into, in this case, a Siege Tank). Place this validator in the behavior remove field, so the behavior is destroyed when the unsiege is complete.
4) The behavior will have an initial effect of an Issue Order effect, ordering in the unit to unsiege.
If you wish to extend this to any other unit, you will need to create a switch effect, and use a validator for each case, checking if the unit has a particular ability, and then doing an issue order effect accordingly. The validator will also have to be a combine of all possible morphs (Phase Prism, Siege Tank, etc.).
I have done exactly as described, but when I launch the projectile at a siege tank, it does not give a damn about it.. : - /
Uncommandable i thought made it so your unit could not use abilities?
If you are using a buff as ArcaneDurandel suggests, make sure, it is actually applied. Otherwise, make sure the effect is executed on the correct unit. Check, if you can issue the order manually, or if it is blocked by any means (requirement, stun behavior, w/e). Check the issue order effect, the Player field has to point to the current owner of the unit, or the issue order won't work (for a behavior, this would probably be source, otherwise target). Also obviously, the unit has to be the correct one as well (again, source for a behavior, otherwise target).
Afaik thats what Disable Abilities is for :D. Uncommandable should prevent orders given to the unit by a player and via trigger, but orders issued by effects should still go through. You might want to check with the flag disabled to make sure, though, maybe it changed at some point.
Thank you Kueken!
I checked everything you mentioned, and now it works.