Ok normally I wouldn't do this and is not something that I or anyone else on this site usually does, but I made a demo map with a morph ability that allows a high templar unit to morph into an archon for 12 seconds and then detransforms. I leave a temporal link the file of the demo map here: https://ydray.com/get/t/u17162386178339eShFd4b16ad4db0eli
To acomplish this I had to do the following I created 2 custom buffs, then created the morph ability the "morph to" unit to archon in the "Info" field of the ability and then the unit archon needs to turn back as the templar in the "Info Umorph" field of the ability, then created two apply behaviors to manage the duration of the morph ability and handle ability commands, after that I created the issue order commands with similiar parameters as I described in my former post. After that I added two "morph related events" within each unit actor (the actor of the custom templar and the actor of the custom archon), in order to allow the templar and the archon to change its model when it morphs or unmorphs.
So if you want to use this morph ability in another map you need either copy or replicate completely all custom elements of the demo map, which are 2 custom units with 2 added events to each unit's custom actor, a custom morph ability, 2 custom buffs, 4 custom effects. The duration of the "Unmorph Timer" buff, determines the duration of the morph ability. To understand which elements I modified within the custom units, unit's actors, ability, behaviors and effects, check the demo map and check all the data fields highlighted in green in each custom object.
I leave screenshots highlighting the events added to each unit actor and another screenshot displaying where within the morph ability, I added the apply behavior effect, that adds the buff that handles the duration of the morph ability.
Since this took me quite some time, this is my final reply on this subject, if you have doubts about how the morph ability works you can check this entry: https://sc2mapster.fandom.com/wiki/Data/Abilities/Morph, if you need a better understanding of the editor check https://sc2mapster.fandom.com/wiki/ or any of the available online tutorials and forums that dive into the different aspects of the editor.
The way I would do this is with a persistent effect and an issue order effect.
First create an issue order effect, then set the effect "Effect: Ability" field to Move, set "Effect: Player" to source, set "Effect: Unit" to source and finally set "Target: Target" to "(None)Target Point".
After that create a persistent effect, this effect will handle the location of the target point where move command is given. In the persisten effect set the "Period: Count" to 1. Then add three durations of 0.0 seconds in the "Effect Period: Duration" field. Then in the "Effect: Period Effects" add the issue order effect you created previously. After that go to the "Effects: Periodic Offsets" and add three offsets, this will be used to set the direction in which the move command is given. The offsets have three parameters (X, Y, Z), in one of the offsets put (X: 0.2, Y: -1.0, Z: 0.0), in another put (X: -0.2, Y: -1.0, Z: 0.0) and in the final one put (X: 0.0, Y: -1.0, Z: 0.0). After that go to the "Effect: Random Offset" and "Effect: Random Period" fields and set both to enabled. Finally go the "Target: Location Offset - Start" field and set it to "(None)Origin Point". Then add the persistent effect as periodic effect to the behaviour that makes the ship drift.
The persistent with these parameters will choose at random one of the three offsets once and execute the move command, taking the original position of the unit with the behaviour and issue that unit the move command to the target point with one of the offsets. The -1 in Y parameter of the offsets, sets the target point for issue order effect, to be to a distance of 1 ahead of the initial position of the unit with the behaviour, the -0.2 or 0.2 in the X parameter of the offsets, will move the point set the by the Y parameter value slightly to the left or the right of the unit with the behaviour and the offset with a parameter of X = 0 and Y = -1 will order the unit the unit to go forward by a distance of 1.
I hope you find this helpful, tweak the values of the offsets in the persistent to achieve the desired effect.
0.921688621512291
Ok normally I wouldn't do this and is not something that I or anyone else on this site usually does, but I made a demo map with a morph ability that allows a high templar unit to morph into an archon for 12 seconds and then detransforms. I leave a temporal link the file of the demo map here: https://ydray.com/get/t/u17162386178339eShFd4b16ad4db0eli
To acomplish this I had to do the following I created 2 custom buffs, then created the morph ability the "morph to" unit to archon in the "Info" field of the ability and then the unit archon needs to turn back as the templar in the "Info Umorph" field of the ability, then created two apply behaviors to manage the duration of the morph ability and handle ability commands, after that I created the issue order commands with similiar parameters as I described in my former post. After that I added two "morph related events" within each unit actor (the actor of the custom templar and the actor of the custom archon), in order to allow the templar and the archon to change its model when it morphs or unmorphs.
So if you want to use this morph ability in another map you need either copy or replicate completely all custom elements of the demo map, which are 2 custom units with 2 added events to each unit's custom actor, a custom morph ability, 2 custom buffs, 4 custom effects. The duration of the "Unmorph Timer" buff, determines the duration of the morph ability. To understand which elements I modified within the custom units, unit's actors, ability, behaviors and effects, check the demo map and check all the data fields highlighted in green in each custom object.
I leave screenshots highlighting the events added to each unit actor and another screenshot displaying where within the morph ability, I added the apply behavior effect, that adds the buff that handles the duration of the morph ability.
Since this took me quite some time, this is my final reply on this subject, if you have doubts about how the morph ability works you can check this entry: https://sc2mapster.fandom.com/wiki/Data/Abilities/Morph, if you need a better understanding of the editor check https://sc2mapster.fandom.com/wiki/ or any of the available online tutorials and forums that dive into the different aspects of the editor.
Best of luck.
0.954959053685168
The way I would do this is with a persistent effect and an issue order effect.
First create an issue order effect, then set the effect "Effect: Ability" field to Move, set "Effect: Player" to source, set "Effect: Unit" to source and finally set "Target: Target" to "(None)Target Point".
After that create a persistent effect, this effect will handle the location of the target point where move command is given. In the persisten effect set the "Period: Count" to 1. Then add three durations of 0.0 seconds in the "Effect Period: Duration" field. Then in the "Effect: Period Effects" add the issue order effect you created previously. After that go to the "Effects: Periodic Offsets" and add three offsets, this will be used to set the direction in which the move command is given. The offsets have three parameters (X, Y, Z), in one of the offsets put (X: 0.2, Y: -1.0, Z: 0.0), in another put (X: -0.2, Y: -1.0, Z: 0.0) and in the final one put (X: 0.0, Y: -1.0, Z: 0.0). After that go to the "Effect: Random Offset" and "Effect: Random Period" fields and set both to enabled. Finally go the "Target: Location Offset - Start" field and set it to "(None)Origin Point". Then add the persistent effect as periodic effect to the behaviour that makes the ship drift.
The persistent with these parameters will choose at random one of the three offsets once and execute the move command, taking the original position of the unit with the behaviour and issue that unit the move command to the target point with one of the offsets. The -1 in Y parameter of the offsets, sets the target point for issue order effect, to be to a distance of 1 ahead of the initial position of the unit with the behaviour, the -0.2 or 0.2 in the X parameter of the offsets, will move the point set the by the Y parameter value slightly to the left or the right of the unit with the behaviour and the offset with a parameter of X = 0 and Y = -1 will order the unit the unit to go forward by a distance of 1.
I hope you find this helpful, tweak the values of the offsets in the persistent to achieve the desired effect.