SC2Mapster Forums

Development > Data

(Solved) Unit Swap Position

  • 10 posts
    #1 Apr 07, 2012 at 16:46 UTC - 0 likes

    I have been browsing the forums for help with this. I have been trying to create a targeted ability in which one unit could swap positions with an allied unit. Can anybody direct me to a tutorial on how to create a move like this?

    #2 Apr 07, 2012 at 18:17 UTC - 0 likes

    You would need to use the Teleport effect. Try a simple Effect - Target ability that uses a Set effect which uses two Teleport effects. One teleports the caster to the target point and the other the target to the caster point.

    #3 Apr 08, 2012 at 06:01 UTC - 0 likes

    I'm getting irritated...

    I can't seem to figure out which values to set under each individual effect tab.

    Under each individual Teleport effect what values do I alter to have the target and caster swap positions. I want to make it a global ability. It' weird either I teleport to the target unit and the target stays put or both units teleport a few units in the opposite direction of each other :(

    #4 Apr 08, 2012 at 06:45 UTC - 0 likes

    Then you might need to use two Create Persistent effects, one ctreated at the target point that in turn then creates one at the caster point. The persistents then use the Teleport effects using the locations of the Create Persistents as a reference as to where to locate.

    #5 Apr 08, 2012 at 14:59 UTC - 0 likes

    I'll try that but I'm not sure because I wan't the ability to work anywhere not just at a designated offset. -_- I'll post later.

    #6 Apr 08, 2012 at 15:25 UTC - 0 likes
    Quote from michaelknives: Go

    I'm getting irritated...

    I can't seem to figure out which values to set under each individual effect tab.

    Under each individual Teleport effect what values do I alter to have the target and caster swap positions. I want to make it a global ability. It' weird either I teleport to the target unit and the target stays put or both units teleport a few units in the opposite direction of each other :(

    Try to set Target: Target + to Target Point as well as Unit: Unit + to Source for the first teleport effect, and Target: Target + to Source Point for the second one.

    http://img577.imageshack.us/img577/4226/blaj.jpg

    #7 Apr 08, 2012 at 16:33 UTC - 0 likes

    @michaelknives: Go

    Persistents do not have to use effects at offsets, they can be used for delays, apply effects for extended periods or just to mark a location. The first persistent will mark the target location point and then use the second one to mark the caster location before the second uses the teleport effects using the two persistents as a reference for the locations.

    #8 Apr 08, 2012 at 21:01 UTC - 0 likes

    Thanks guys

    #9 Apr 08, 2012 at 21:30 UTC - 0 likes

    So solved?

    #10 Apr 11, 2012 at 18:04 UTC - 0 likes

    yerp

  • 10 posts

You must login to post a comment. Don't have an account? Register to get one!