1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Ride into the sunset with the 32nd Modeling Contest. The contest is optionally paired. Best of luck, people!
    Dismiss Notice
  5. This adventure has come to an end. Congratulate our heroes in the 16th Mini Mapping Contest Results.
    Dismiss Notice
  6. From the gates of hell, the 5th Special Effect Contest Results have emerged.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Viewer

Unit Movement System.w3x
Variables
Unit Movement System
Introduction
features and functions
how to use
notes
notes #2
Credits
Timed Life for Effects
Unit Movement Systemd
testing
map vision
Projectile running damage path
Projectile running explode at end
Projectile stop at 1 target use trigger
Custom Trigger
Final note
Untitled Trigger 001
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code except Custom Script Item. Custom Script Item will merge into map script after globals variables declaration with the list order in trigger view.

		
Name Type Is Array Initial Value
unit unit No
UnitMovingPointActiveInd integer No
UnitMovingPointReached boolean Yes
X real No
Y real No
Hey guys!

This system can help you make projectile triggered movement in a matter of seconds!

the way to use it is to make a customs script and write this in it but changing the fields:

"call UnitMovingPointInit( unit u, real x, real y, real speed, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End )"

ofc you don't copy paste that! you need to change the fields. each field in that has either a "unit","real" or "trigger". This is the kind of each field.

Lets have a look!

Please read all the Trigger Comments, ESPECIALLY notes and notes #2.

"call UnitMovingPointInit( unit u, real x, real y, real speed, real height, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string EndingSFX, boolean Remove, boolean End )"

u: the moving unit
x: the X coordinate of the point you want the unit to move to. it is a real variable so you can get it from a location
y: the Y coordinate of the point, same as above
speed: the speed at which the unit moves.
height: the max height the unit will reach, according to Sin graph. Unit must be "Fly", or use the crow form bug.

FirstTarget: this is a boolean. if it is true, the unit will stop when colliding with a target. if false, it will continue to the end of the path
DamageDuringPath: this is the damage that is dealt when colliding with a target.
CollisionSize: this is the collision range, basically the range of DamageDuringPath and FirstTarget.
CollisionTrig: this is a trigger that is activated when the unit collides with a target. Only works if FirstTarget is true.

ExplodeInEnd: this is a boolean. if true, the explosion aspect of the system will be on, which will enable the following fields:
ExplodeDamage: the damage dealt at the end of the path in an AoE
ExplodeAoE: the AoE of that ExplodeDamage
EndingTrig: the trigger that is activated at the end of the path.

EndingSFX: its a string that is the path of a special effect which is created when the ability finishes. Requires either FirstTarget to be enabled or ExplodeInEnd to be enabled

Remove: this is a boolean. If true, the unit will be removed from index and from the game at the end
End: this is a boolean. If true, the unit will be removed from index only and not from game. In case you dont want it removed

You need to fill every spot of the function:

"call UnitMovingPointInit( unit u, real x, real y, real speed, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End )"
which is basically:
"call UnitMovingPointInit( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 )"
16 fields.

So for reals, you must insert a number. If you dont want a field, insert 0.
for booleans, you either insert true or false.
for triggers, you either type a trigger name or type "null" if you don't want it.
for string, you either type the path of the effect, or type "null" if you don't want it.


You can also use variables in this line, however you need to know some things about jass:
1- if a variable is named "Hero", it will be "udg_Hero" in jass. if it is "TempUnit" it will be "udg_TempUnit". You basically add "udg_" to the name
2- if a trigger is named "Projectile Shot", it will be "gg_trg_Projectile_Shot". if it is "Untitled Trigger 1", it will be "gg_trg_Untitled_Trigger_1". You add "gg_trg_" to the name and also change every space to "_"
3- if the path of an SFX is "Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl" it will be "Abilities\\Spells\Human\\Thunderclap\\ThunderClapCaster.mdl". If it is "Chidori.mdl", it will stay the same. Basically if there are "\" in the file path, make them 2.


Example: Custom Script: "call UnitMovingPointInit(udg_TempUnit, udg_Xvariable, udg_Yvariable, 30, 0, false, 500, 40, null, true, 6000, 300, gg_trg_Test_Trigger, null, true, true)"

NOTE #1: this system uses "Unit Group - Pick every units in X (CollisionSize) around unit". And so you need to check the speed and the collision range in order to not have the unit deal damage to the same area twice. basically you should keep the collision size to half the speed. You are free to experiment as you like with it.

NOTE #2: If a trigger is assigned to this line and it is activated, the system automatically modifies the variable "UnitMovingPointActiveInd" to be that index number, so you can get the unit using the unit index variable and the index of it.

NOTE #3: To get the unit when activating a trigger associated with the function, have a unit variable and type this custom script: "set udg_[VARIABLE] = UnitMovingPointU[udg_UnitMovingPointActiveInd]"
Example: if your variable is called "MovingUnit" then "set udg_MovingUnit = UnitMovingPointU[udg_UnitMovingPointActiveInd]"

NOTE #4: If you set Remove or End to false and want to manually remove the unit FROM THE INDEX (not from the game), then use this custom script: "set UnitMovingPointU[udg_UnitMovingPointActiveInd] = null"
However, if there was a delay between the trigger being activated and this being used, it may overlap with another trigger. causing an issue.

NOTE #5: this function also returns an integer. What does this mean? This means that this function can be assigned to an integer variable, and will give a number which is the number of the index the data is stored in, This makes it very easy to manually assign custom triggers and actions to the unit or the X and Y coordinates.
Example: if you have an integer variable "NUMB", use custom script: "set udg_NUMB = UnitMovingPointInit(udg_unit,udg_X,udg_Y,40,20,true,100,50, gg_trg_Custom_Trigger, false,0,0,null,null,false,true)"
Notice that we don't put "call" when doing that.

NOTE #6: When the unit reaches his destination, the variable "UnitMovingPointReached" will become TRUE. You can use this for custom triggers and actions as well (you will need to use NOTE #5 to get the i



NOTE #6: When the unit reaches his destination, the variable "UnitMovingPointReached" will become TRUE. You can use this for custom triggers and actions as well (you will need to use NOTE #5 to get the index number of the data.)

NOTE #7: You can measure distances in world editor through the X and Y coordinates you get at the bottom left of the editor. Move your mouse horizontally or vertically then use the calculator to subtract new X from old X (if horizontally) or new Y from old Y (if vertically). This will make your life easier to determine the ranges you want.

NOTE #8: If you need anything, send me a message. If you need additional functions and things, send me a message. If you have a question, send me a message. If you have an answer, send me a message. If you exist, send me a message.

Actually I'm not joking with the "additional functions" things. I can already think of other additions that can be made like having a field to change the scale of the SFX, having a trigger that is activated every time a unit is hit (instead of just at the end or only when FirstTarget is on), detecting units that are hit by the unit, and much more. I can make a version for you with them.


NOTE #9: Please give me credits in your map and send feedback. <3 <3 <3





Unit Movement System was made by Deadreyo, while Timed Life for Effects system was made by TriggerHappy. It is used only for the SFX so you can ask me for a version of the system without SFX.
library TimedHandles uses optional TimerUtils
/**************************************************************
*
*   v1.0.5 by TriggerHappy
*   ----------------------
*
*   Use this to destroy a handle after X amount seconds.
*
*   It's useful for things like effects where you may
*   want it to be temporary, but not have to worry
*   about the cleaning memory leak. By default it supports
*   effects, lightning, weathereffect, items, ubersplats, and units.
*
*   If you want to add your own handle types copy a textmacro line
*   at the bottom and add whichever handle you want along with it's destructor.
*
*   Example: //! runtextmacro TIMEDHANDLES("handle", "DestroyHandle")
*
*   Installation
    ----------------------
*       1. Copy this script and over to your map inside a blank trigger.
*       2. If you want more efficiency copy TimerUtils over as well.
*
*   API
*   ----------------------
*       call DestroyEffectTimed(AddSpecialEffect("effect.mdx", 0, 0), 5)
*       call DestroyLightningTimed(AddLightning("CLPB", true, 0, 0, 100, 100), 5)
*
*   Credits to Vexorian for TimerUtils and his help on the script.
*
**************************************************************/


    globals
        // If you don't want a timer to be ran each instance
        // set this to true.
        private constant boolean SINGLE_TIMER = true
        // If you chose a single timer then this will be the speed
        // at which the timer will update
        private constant real    UPDATE_PERIOD = 0.05
    endglobals

    // here you may add or remove handle types
    //! runtextmacro TIMEDHANDLES("effect", "DestroyEffect")
    //! runtextmacro TIMEDHANDLES("lightning", "DestroyLightning")
    //! runtextmacro TIMEDHANDLES("weathereffect", "RemoveWeatherEffect")
    //! runtextmacro TIMEDHANDLES("item", "RemoveItem")
    //! runtextmacro TIMEDHANDLES("unit", "RemoveUnit")
    //! runtextmacro TIMEDHANDLES("ubersplat", "DestroyUbersplat")
   
    // Do not edit below this line
   
    //! textmacro TIMEDHANDLES takes HANDLE,DESTROY
       
        struct $HANDLE$Timed
       
            $HANDLE$ $HANDLE$_var
            static integer index = -1
            static thistype array instance
            static real REAL=UPDATE_PERIOD
           
            static if SINGLE_TIMER then
                static timer timer = CreateTimer()
                real duration
                real elapsed = 0
            else static if not LIBRARY.TimerUtils then
                static hashtable table = InitHashtable()
            endif
           
            method destroy takes nothing returns nothing
                call $DESTROY$(this.$HANDLE$_var)
                set this.$HANDLE$_var = null
               
                static if SINGLE_TIMER then
                    set this.elapsed = 0
                endif
               
                call this.deallocate()
            endmethod
           
            private static method remove takes nothing returns nothing
                static if SINGLE_TIMER then
                    local integer i = 0
                    local thistype this
                    loop
                        exitwhen i > thistype.index
                        set this = instance[i]
                        set this.elapsed = this.elapsed + UPDATE_PERIOD
                        if (this.elapsed >= this.duration) then
                            set instance[i] = instance[index]
                            set i = i - 1
                            set index = index - 1
                            call this.destroy()
                            if (index == -1) then
                                call PauseTimer(thistype.timer)
                            endif
                        endif
                        set i = i + 1
                    endloop
                else
                    local timer t = GetExpiredTimer()
                    static if LIBRARY.TimerUtils then
                        local $HANDLE$Timed this = GetTimerData(t)
                        call ReleaseTimer(t)
                        call this.destroy()
                    else
                        local $HANDLE$Timed this = LoadInteger(table, 0, GetHandleId(t))
                        call DestroyTimer(t)
                        set t = null
                        call this.destroy()
                    endif
                endif
            endmethod
           
            static method create takes $HANDLE$ h, real timeout returns $HANDLE$Timed
                local $HANDLE$Timed this = $HANDLE$Timed.allocate()
               
                static if SINGLE_TIMER then
                    set index = index + 1
                    set instance[index] = this
                    if (index == 0) then
                        call TimerStart(thistype.timer, UPDATE_PERIOD, true, function thistype.remove)
                    endif
                    set this.duration = timeout
                else
                    static if LIBRARY.TimerUtils then
                        call TimerStart(NewTimerEx(this), timeout, false, function $HANDLE$timed.remove)
                    else
                        local timer t = CreateTimer()
                        call SaveInteger(thistype.table, 0, GetHandleId(t), this)
                        call TimerStart(t, timeout, false, function $HANDLE$Timed.remove)
                        set t = null
                    endif
                endif  
               
                set this.$HANDLE$_var = h
               
                return this
            endmethod
           
        endstruct
       
        function $DESTROY$Timed takes $HANDLE$ h, real duration returns $HANDLE$Timed
            return $HANDLE$Timed.create(h, duration)
        endfunction

    //! endtextmacro
   
endlibrary
//system made by deadreyo. have fun!




library UnitMovingPointSystem initializer Unit_Movement_SystemInit

globals
    unit array UnitMovingPointU
    real array UnitMovingPointX
    real array UnitMovingPointY
    real array UnitMovingPointSpeed
    real array UnitMovingPointRangeCheck
    real array UnitMovingPointHeight
    real array UnitMovingPointDistance

    boolean array UnitMovingPointFirstTarget
    real array UnitMovingPointDamageDuringPath
    real array UnitMovingPointCollisionSize
    trigger array UnitMovingPointCollisionTrig



    boolean array UnitMovingPointExplodeInEnd
    real array UnitMovingPointExplodeDamage
    real array UnitMovingPointExplodeAoE
    trigger array UnitMovingPointEndingTrig
    string array UnitMovingPointExplodeSFX
   
    boolean array UnitMovingPointRemove
    boolean array UnitMovingPointEnd
   
    boolean array UnitMovingPointReached
   
    integer UnitMovingPointInd = 0
    integer UnitMovingPointActiveInd = 0
endglobals

function UnitMovingPointRun takes nothing returns nothing
    local integer i2 = 0
    local integer i = 0
    local group g = null
    local unit u2 = null
    local location l = null
    local location l2 = null
    local boolean bo = false
    local real x = 0
    local real y = 0
    local real d = 0
    loop
        exitwhen i > UnitMovingPointInd
        if UnitMovingPointU[i] != null then
            set x = GetUnitX(UnitMovingPointU[i])
            set y = GetUnitY(UnitMovingPointU[i])
       
            if IsUnitInRangeXY(UnitMovingPointU[i],UnitMovingPointX[i],UnitMovingPointY[i],UnitMovingPointRangeCheck[i]) then
                set UnitMovingPointReached[i] = true
                if UnitMovingPointExplodeInEnd[i] then
                    call DestroyEffectTimed(AddSpecialEffect(UnitMovingPointExplodeSFX[i], x, y), 5)
                    set g = CreateGroup()
                    call GroupEnumUnitsInRange(g,x,y,UnitMovingPointExplodeAoE[i],null)
                    loop
                        exitwhen BlzGroupGetSize(g) == 0
                            set u2 = FirstOfGroup(g)
                        if IsUnitEnemy(u2,GetOwningPlayer(UnitMovingPointU[i])) and GetUnitState(u2,UNIT_STATE_LIFE) > 0 then
                            call UnitDamageTarget(UnitMovingPointU[i],u2,UnitMovingPointExplodeDamage[i],false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
                        endif
                        call GroupRemoveUnit(g,u2)
                    endloop
                    call DestroyGroup(g)
                endif
                if UnitMovingPointEndingTrig[i] != null then
                    set UnitMovingPointActiveInd = i
                    call TriggerExecute(UnitMovingPointEndingTrig[i])
                endif
                if UnitMovingPointRemove[i] then
                    call RemoveUnit(UnitMovingPointU[i])
                    set UnitMovingPointU[i] = null
                endif
                if UnitMovingPointEnd[i] then
                    set UnitMovingPointU[i] = null
                endif
                loop
                    exitwhen i2 > UnitMovingPointInd
                    if UnitMovingPointU[i2] != null then
                        set bo = true
                    endif
                    set i2 = i2 + 1
                endloop
                if bo == false then
                    set UnitMovingPointInd = 0
                endif
            else
                set l = Location(x,y)
                set l2 = Location(UnitMovingPointX[i],UnitMovingPointY[i])
                call SetUnitX(UnitMovingPointU[i], x + UnitMovingPointSpeed[i] * Cos(AngleBetweenPoints(l,l2) * bj_DEGTORAD))
                call SetUnitY(UnitMovingPointU[i], y + UnitMovingPointSpeed[i] * Sin(AngleBetweenPoints(l,l2) * bj_DEGTORAD))
        set d = SquareRoot(Pow((GetUnitX(UnitMovingPointU[i])-UnitMovingPointX[i]),2)+Pow((GetUnitY(UnitMovingPointU[i])-UnitMovingPointY[i]),2))
        call SetUnitFlyHeight(UnitMovingPointU[i],UnitMovingPointHeight[i]*Sin(bj_PI*d/UnitMovingPointDistance[i]),0.0)
        call RemoveLocation(l)
                call RemoveLocation(l2)
                if UnitMovingPointCollisionSize[i] != 0 then
                    set g = CreateGroup()
                    call GroupEnumUnitsInRange(g,GetUnitX(UnitMovingPointU[i]),GetUnitY(UnitMovingPointU[i]),UnitMovingPointCollisionSize[i],null)
                    loop
                        exitwhen BlzGroupGetSize(g) == 0
                            set u2 = FirstOfGroup(g)
                        if IsUnitEnemy(u2,GetOwningPlayer(UnitMovingPointU[i])) and GetUnitState(u2,UNIT_STATE_LIFE) > 0 then
                            call UnitDamageTarget(UnitMovingPointU[i],u2,UnitMovingPointDamageDuringPath[i],false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
                            if UnitMovingPointFirstTarget[i] then
                                if UnitMovingPointCollisionTrig[i] != null then
                                    set UnitMovingPointActiveInd = i
                                    call TriggerExecute(UnitMovingPointCollisionTrig[i])
                                endif
                                if UnitMovingPointRemove[i] then
                                    call RemoveUnit(UnitMovingPointU[i])
                                    set UnitMovingPointU[i] = null
                                endif
                                    if UnitMovingPointEnd[i] then
                                    set UnitMovingPointU[i] = null
                                endif
                                call DestroyEffectTimed(AddSpecialEffect(UnitMovingPointExplodeSFX[i], 0, 0), 5)
                            endif
                        endif
                        call GroupRemoveUnit(g,u2)
                    endloop
                    call DestroyGroup(g)
               
               
                endif


            endif
        endif



        set i = i + 1
    endloop
set g = null
set u2 = null
set l = null
set l2 = null
endfunction



function UnitMovingPointInit takes unit u, real x, real y, real speed, real height, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End returns integer
    set UnitMovingPointU[UnitMovingPointInd] = u
    set UnitMovingPointX[UnitMovingPointInd] = x
    set UnitMovingPointY[UnitMovingPointInd] = y
    set UnitMovingPointSpeed[UnitMovingPointInd] = speed //speed of the projectile
    set UnitMovingPointHeight[UnitMovingPointInd] = height
    set UnitMovingPointRangeCheck[UnitMovingPointInd] = CheckRange //IsUnitInRange, the distance needed between unit and point
   
    set UnitMovingPointDistance[UnitMovingPointInd] = SquareRoot(Pow((x-GetUnitX(u)),2)+Pow((y-GetUnitY(u)),2))

    set UnitMovingPointFirstTarget[UnitMovingPointInd] = FirstTarget //activate function and checks if remove is allowed when first enemy hit
    set UnitMovingPointDamageDuringPath[UnitMovingPointInd] = DamageDuringPath //damage during path
    set UnitMovingPointCollisionSize[UnitMovingPointInd] = CollisionSize //range of collision during path
    set UnitMovingPointCollisionTrig[UnitMovingPointInd] = CollisionTrig //a trigger that runs when the unit collides with an enemy unit. Only works if FirstTarget is on


    set UnitMovingPointExplodeInEnd[UnitMovingPointInd] = ExplodeInEnd   //controls if unit deals damage at end point in aoe
    set UnitMovingPointExplodeDamage[UnitMovingPointInd] = ExplodeDamage // damage of that ending aoe
    set UnitMovingPointExplodeAoE[UnitMovingPointInd] = ExplodeAoE //aoe of the ending damage
    set UnitMovingPointEndingTrig[UnitMovingPointInd] = EndingTrig //trigger that is activated at the end
    set UnitMovingPointExplodeSFX[UnitMovingPointInd] = ExplodeSFX //creates SFX with this string. Only works if ExplodeDamage is more than 0
   
    set UnitMovingPointRemove[UnitMovingPointInd] = Remove  //controls if the unit is removed from the index and the game when finished.
    set UnitMovingPointEnd[UnitMovingPointInd] = End //controls if the unit is removed from the index, but not removed from game


    set UnitMovingPointInd = UnitMovingPointInd + 1
    return UnitMovingPointInd - 1
endfunction

function Unit_Movement_SystemInit takes nothing returns nothing
    call TimerStart(CreateTimer(),0.03,true,function UnitMovingPointRun)
endfunction

endlibrary
map vision
  Events
    Map initialization
  Conditions
  Actions
    Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
Projectile running damage path
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to Slow
  Actions
    -------- This trigger will make a projectile that goes to the target point and deal damage to enemies it collide with. --------
    Unit - Create 1.Dummy 1 for Player 1 (Red) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
    Set VariableSet unit = (Last created unit)
    Set VariableSet X = (X of (Target point of ability being cast))
    Set VariableSet Y = (Y of (Target point of ability being cast))
    -------- call UnitMovingPointInit( unit u, real x, real y, real speed, real height, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, --------
    -------- boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End) --------
    -------- you need to fill all those fields. Reals are filled with numbers, boolean are True or False, triggers can be assigned to a trigger or be "null". --------
    Custom script: call UnitMovingPointInit(udg_unit,udg_X,udg_Y,40,0,21,false,50,50,null,false,0,0,null,null,true,true)
Projectile running explode at end
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to slow2
  Actions
    -------- This trigger will make a projectile that goes to the target point and deal damage at the end and create SFX. --------
    Unit - Create 1.Dummy 2 for Player 1 (Red) at (Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
    Set VariableSet unit = (Last created unit)
    Set VariableSet X = (X of (Target point of ability being cast))
    Set VariableSet Y = (Y of (Target point of ability being cast))
    -------- call UnitMovingPointInit( unit u, real x, real y, real speed, real height, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, --------
    -------- boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End) --------
    -------- you need to fill all those fields. Reals are filled with numbers, boolean are True or False, triggers can be assigned to a trigger or be "null". --------
    -------- if you want it to arc, the movement type of the unit must be FLY --------
    Custom script: call UnitMovingPointInit(udg_unit,udg_X,udg_Y,40,300,20,false,0,0,null,true,100,300,null,"Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl",true,true)
Projectile stop at 1 target use trigger
  Events
    Unit - A unit Starts the effect of an ability
  Conditions
    (Ability being cast) Equal to slow3
  Actions
    -------- This trigger will make a projectile that hits the first target hit and stops at him. It will also activate a trigger. --------
    Unit - Create 1.Sorceress for Player 1 (Red) at (Position of (Triggering unit)) facing Default building facing degrees
    Set VariableSet unit = (Last created unit)
    Set VariableSet X = (X of (Target point of ability being cast))
    Set VariableSet Y = (Y of (Target point of ability being cast))
    -------- call UnitMovingPointInit( unit u, real x, real y, real speed, real height, real CheckRange, boolean FirstTarget, real DamageDuringPath, real CollisionSize, trigger CollisionTrig, --------
    -------- boolean ExplodeInEnd, real ExplodeDamage, real ExplodeAoE, trigger EndingTrig, string ExplodeSFX, boolean Remove, boolean End) --------
    -------- you need to fill all those fields. Reals are filled with numbers, boolean are True or False, triggers can be assigned to a trigger or be "null". --------
    Custom script: call UnitMovingPointInit(udg_unit,udg_X,udg_Y,40,0,20,true,100,50, gg_trg_Custom_Trigger, false,0,0,null,null,false,true)
Custom Trigger
  Events
  Conditions
  Actions
    Custom script: set udg_unit = UnitMovingPointU[udg_UnitMovingPointActiveInd]
    Game - Display to (All players) the text: Mecha Tassadar ONLINE.
    Special Effect - Create a special effect attached to the overhead (attachpoint) of unit using Doodads\Outland\Props\Altar\Altar.mdl
    Unit - Create 1.Rabbit for Player 1 (Red) at (Position of unit) facing Default building facing degrees
    -------- you can remove the unit after that, but i didnt because i was too lazy to make another unit variable --------
Those are just 3 basic examples to get you to better identify the system. The things that can be made with it are unlimited.

It can used as a dash ability for units to dash to the target point

it can be used as a skillshot that explodes at the end of the path with some cool SFX and stuff

it can be used as a skillshot that stops at the first target and
Untitled Trigger 001
  Events
  Conditions
  Actions