[Spell] Star Slash Skill Topic

Level 7
Joined
Oct 6, 2022
Messages
168
Hello Everyone, anyone knows how to make the Caster move to do the Star Shape movement or dash like this example image that i've made below, the skill could be a "No target, AoE target, or Target Unit" it's okay which one of these two you would like to do as long as it meet this:

If no Target - It base on Caster Position
If AoE Target - It base on Target Point
If Target Unit - It base on the last Position of the Targeted Unit

here is the example image that i've made:

Star Slash.png

hope you guys could help me with this one, thanks.
 
Level 24
Joined
Jun 26, 2020
Messages
1,884
Hello, if you notice, the next point the caster will move is its position in a circumference, but increasing the angle formed with the position of the caster and the center of the circle by 144 degrees or 4pi/5 radians:
1717390079906.png

So your first step will find the center of that circle based on the position of the caster, for example, the problem is that I don't end to understand how are you basing the position. But assuming that we know that center then the spell would look like this (I will just make a pseudocode, because I don't know how to make you an actual system that you would understand, probably someone else could do it):
Code:
centerX, centerY = Center of that circle
firstX, firstY = First Point
firstAngle = Atan(firstY - centerY, firstX - centerX)

for i = 1, 5
  angle = firstAngle + i * 144°
  nextX, nextY = centerX + Radius * cos(angle), centerY + Radius * sin(angle)
  Make the unit do the dash to that nextX, nextY assuming that you have a system that does
  that and wait that the unit finishes the dash before doing the next iteration
 
Level 7
Joined
Oct 6, 2022
Messages
168
Oh yeah i forgot to add the position of the Caster Thank You. Here's the

"No target point" and "Target Unit"
efdf3c79-fc16-4e66-8e37-c1f796520cbf.png

It's also the same as the AoE Target but without caster and the target unit position.


I'll wait for more replies to come.
The system that i like to use is the Gui, but you guys could also put some Jass here so that we could share our thoughts on how this could get done in two different ways if it was built in Gui or Jass
 

Uncle

Warcraft Moderator
Level 69
Joined
Aug 10, 2018
Messages
7,166
Have you ever used the Point with Polar Offset function? It's pretty simple to use.
  • Set CenterPoint = (Position of unit)
  • Set StarPoint[1] = (CenterPoint offset by 300.00 towards 252.00 degrees)
  • Set StarPoint[2] = (CenterPoint offset by 300.00 towards 90.00 degrees)
  • Set StarPoint[3] = (CenterPoint offset by 300.00 towards 144.00 degrees)
  • Set StarPoint[4] = (CenterPoint offset by 300.00 towards 36.00 degrees)
  • Set StarPoint[5] = (CenterPoint offset by 300.00 towards 324.00 degrees)
0 degrees = east
90 degrees = north
180 degrees = west
270 degrees = south

With that in mind, you just need to figure out what your degrees need to be. I just guessed in the above example.
 
Level 41
Joined
Feb 27, 2007
Messages
5,233
There's no way to automatically move a unit like that over time. You will have to move it in small increments with a fast periodic trigger. There are knockback systems that might help you here but you need to do 5 lines in rapid succession with precision so I don't really think that's the play. A better solution would probably be to hide the casting unit and then use its model as a projectile with something like Relativistic Missiles [vJASS][LUA][GUI]. You could also simulate this effect by having invisible dummies at each vertex cast a projectile spell at one of the other dummies using the caster's model as the projectile model.

The best solution is of course going to just be moving the unit yourself. The cool thing is that if you generate all 5 points beforehand you can do some simple math to find the x and y 'steps' you have to take on each leg. To move from point (Ax,Ay) to point (Bx,By) in N steps, you must move by (Bx-Ax)/N in the x-direction each step, and by (By-Ay)/N in the y-direction each step. No angles required. Pause the caster during this animation or this relational move will not work properly.

To make this work for multiple casters simultaneously without breaking your code you'll need to design it intelligently with this in mind. Otherwise you'll just overwrite data you were using and it'll get all tangled up. The common Dynamic Indexing method will work here, but you have to know what you're doing to set it all up properly. You could also use a Unit Indexer though I am not as much a fan of that approach as others here are. (Uncle)

Another thing to consider is the orientation of the star. Should the top point always be directly North of the target, or should the top point lie on a line between the caster and the target?
 
Level 13
Joined
Jan 10, 2023
Messages
223
I had a similar ability a while back and this inspired me to make a GUI ability like the one you described that I'll share when I get out of work tomorrow, maybe it will be adaptable for your purposes.

As for the star itself, that math is correct above, 144 degrees is 1/5 of 360 and that's the magic number, 135 is the angle between a side length and the center.

As for the GUI trigger ability I mentioned, I have a working model that I will share tomorrow afternoon (+18:00 from the time I posted this ), but as Pyrogasm has stated there are many other questions to answer...

At this point I'm invested in my system for my own sake because of the effort I've already put in, but here are some of the questions I have if what I mentioned sounded interesting:
As for the angle of the star, I went with a relative angle based on the approach angle, and to simplify a lot, I decided the unit should be invulnerable during the ability, if that doesn't work for you then I think even the projectile concept will be a difficult one because the unit will not be where it is visually, so I hope that is acceptable.

Keep in mind that most of what I am about to say is based on the caster being invulnerable, so it shouldn't matter that I will pause it, the collision being turned off, so it will go through anything, and depending on how you feel about the unit passing directly through other units (I didn't see anything about knock-back, but it is something to consider and will increase the complexity of this ability).

Another important question (again, as stated) is collision, although if you were willing to make this ability target the ground, the you can bypass this issue by treating the ability like blink and just letting units get stuck if they want.
Otherwise I think it's just a question of where you want to land the unit and checking if it is a valid location to place it with a dummy.
I'm also wondering if you want this ability to work through walls, using a very fast dummy you could check, but again maybe that won't be necessary, this could even depend on the environment you are making the ability for.
[\spoiler]
 
Level 13
Joined
Jan 10, 2023
Messages
223
I'm sorry to double post, but it's been much longer than I said it would be and I wanted to give an update as to why:
2 reasons:
1. personal life demanded my time unexpectedly.
2. I opted to instead create a system that can do any odd number of points in a star pattern. (1&3 points won't really be a star, but they will be included because they are valid according to the math).
This will be defined by the star's "type" which is an integer (0-infinity) where
type 0 = 1 point
type 1 = 3 points
type 2 = 5 points
et c.

That being said, I felt it is unfair to ask you to wait on me for something that is taking longer because it is more than your ask, so if anyone else wants to swoop in and help, by all means, I intend to finish by the end of this coming weekend but hope for sooner, although realistically it could be a bit longer than the weekend.
 
Level 13
Joined
Jan 10, 2023
Messages
223
EDIT: I was lurking, as I sometimes do, and I noticed you use WC3 v1.30... this will not work for you as it currently is. This certainly changes the native functions I have to use. I am willing to convert/ work this into something that will work for you, but that will take me some time and will probably cause me to make some design changes. That being said, I should find the optimal version of WC3 to build it in to ensure as much reverse-compatibility as possible.
Sorry about that!
[/EDIT:]

Well, it's been much longer than I had hoped for, but here is the system I came up with.
I didn't get any feedback so I just went with what made sense to me.
I went with a JASS system that is built to be manipulated with GUI, hoping it would be the best of both worlds since it keeps most of the system out of sight and working more efficiently.

I wrote a public API in the JASS section and and hoping that you won't mind learning the finer points of the system from reading it and from testing the test map I attached.

Here is a basic description of how it works:
  1. Create a trigger with the "Unit - A unit Starts the effect of an ability" event.
  2. Set the conditions of that trigger to run only when the correct ability is cast.
  3. Set the parameters of the Star Dash ability.
    • Some parameters will work better if uniquely specified per unit type.
  4. Dash abilities trigger dash events that allow for more dynamic ability functions.

Other Key Features:
  • The System is MUI so any number of units can use it at a time.
  • The casting unit will function like a normal channeling unit will - ignoring group orders when busy et c.
  • If given a direct order, the unit will stop channeling.
  • Using this ability will not interrupt the order queue (except in one known situation).
  • Ability animation support is built in.

JASS:
/*    Star Dash Public API

/////////////////////////
       Contents
/////////////////////////
        1. Global Settings
        2. Initiating a dash
        3. Cancelling a dash
        4. Dash Events
        5. The Dash Ability

       *All variables and functions are listed and described in their respective sections.

/////////////////////////
    1. Global Settings
/////////////////////////

    public real udg_SDGlobalTickRate
        - This value can be changed at any time but will effect all dashes globally.

    public integer udg_SDGlobalInvulnerability
        - This value can be changed at any time but will effect all dashes globally.
        - Changing this setting after initiation is not advised.
        - This is an AbilityId integer variable in the editor.

    public integer udg_SDGlobalSpellImmunity
        - This value can be changed at any time but will effect all dashes globally.
        - Changing this setting after initiation is not advised.
        - This is an AbilityId integer variable in the editor.


/////////////////////////
    2. Initiating a dash
/////////////////////////

    function SD_InitiateDash takes nothing returns nothing
     - This function should only be called in response to the event "Unit - A unit Starts the effect of an ability".
     - A successful dash initiation will trigger the begin dash event (event 1.00)
     - The Following variables can be set before calling SD_InitiateDash and will then function as optional inputs:

        public integer udg_SDashMode
            - Determines the number of points the star will have.
            - Absolute value is used.
            - Input of 0 gives 1 point.
            - Input of 1 gives 3 points.
            - Input of 2 gives 5 points.
            - There is no theoretical maximum.

        public integer udg_SDashMoveTicks
            - Determines the number of ticks in a move sequence.
            - Total ticks is determined by this formula: stand ticks + total points x ( move ticks + turn ticks + stand ticks )
            - Input of 0 means this sub sequence will be skipped.

        public integer udg_SDashTurnTicks
            - Determines the number of ticks in a turn sequence.
            - Total ticks is determined by this formula: stand ticks + total points x ( move ticks + turn ticks + stand ticks )
            - Input of 0 means this sub sequence will be skipped.

        public integer udg_SDashStandTicks
            - Determines the number of ticks in a stand sequence.
            - Total ticks is determined by this formula: stand ticks + total points x ( move ticks + turn ticks + stand ticks )
            - Input of 0 means this sub sequence will be skipped.

        public real udg_SDashStarRadius
            - Determines the distance of the points from the centerpoint (the target point).
            - Input of 0 means will use the ability's AoE real field.

        public real udg_SDashJumpHeight
            - Determines the height of the arc use for the move sequence.
            - Input of 0 will have no arc.
            - Negative input will cause flying units to swoop.

        public real udg_SDashHoverHeight
            - Determines the height off of the ground the unit will hover during the turn and stand sequences.
            - Input of 0 will stay at its default height.

        public boolean udg_SDashKeepNewLocation
            - If true, the dasher will not go back to where it was when it is finished or if it is interrupted.
            - If false, the dasher will remember where it first casted the ability from and will return when the dash ends or is interrupted.

        public boolean udg_SDashIsInvulnerable
            - If true the dasher will be given udg_SDGlobalInvulnerability.
            - It is recommended that you use a unique invulnerability ability for this system if you are using invulnerability.

        public boolean udg_SDashIsSpellImmune
            - If true the dasher will be given udg_SDGlobalSpellImmunity.

        public integer udg_SDashMoveAnimationIndex
            - This value will be used if udg_SDashMoveAnimationRate is zero to any value >= 0
            - This value will have a unique animation for each unit model type (unique inputs will be needed for each unit type).
            - It is recommended that you use a unique spell immunity ability for this system if you are using spell immunity.

        public real udg_SDashMoveAnimationRate
            - If this value is < 0, move animations will be skipped.
            - A value of 1.00 means normal animation speed.
            - A value of 2.00 means double animation speed.

        public integer udg_SDashTurnAnimationIndex
            - This value will be used if udg_SDashTurnAnimationRate is zero to any value >= 0
            - This value will have a unique animation for each unit model type (unique inputs will be needed for each unit type).

        public real udg_SDashTurnAnimationRate
            - If this value is < 0, turn animations will be skipped.
            - A value of 1.00 means normal animation speed.
            - A value of 2.00 means double animation speed.

        public integer udg_SDashStandAnimationIndex
            - This value will be used if udg_SDashStandAnimationRate is zero to any value >= 0
            - This value will have a unique animation for each unit model type (unique inputs will be needed for each unit type).

        public real udg_SDashStandAnimationRate
            - If this value is < 0, stand animations will be skipped.
            - A value of 1.00 means normal animation speed.
            - A value of 2.00 means double animation speed.


/////////////////////////
    3. Cancelling a Dash
/////////////////////////

    function SD_CancelDash takes unit u returns boolean
     - This function is meant to be used any time a dash is to be terminated early.
     - Dashes should terminate on their own in the event that the dashing unit is stunned or otherwise interrupted by abilities.
     - A cancelled dash will trigger the interrupted dash event (event 7.00).


/////////////////////////
    4. Dash Events
/////////////////////////

    public real udg_StarDashEvent
     - This real variable will be set to unique values to allow the editor to track trigger events.
     - Variables in the editor that begin with "SDEvent..." will represent the related variable for the dash that is triggering the event.
     - Event Types:
         Value     Event
         -1.00    - This event occurs immediately before any event type.
          0.00    - This event occurs at the end of a dash that was not interrupted.
          1.00    - This event occurs at the beginning of a dash.
          2.00    - This event occurs at every move tick.
          3.00    - This event occurs at every turn tick.
          4.00    - This event occurs at every stand tick.
          5.00    - This event occurs if the dasher is stunned.
          6.00    - This event occurs when a stunned dasher is no longer stunned.
          7.00    - This event occurs if the dasher is interrupted by anything other than a stun.

         *6.00    - The dash spell cannot be cancelled while the unit is stunned, so the system waits until the stun has expired to fully purge the dash information.
                  This event represents the final purge of the dash data.

     - Event Response Variables:

        public unit udg_SDEventCaster
            - This is the dashing unit of a dash event.

        public unit udg_SDEventTarget
            - This is the target unit of a dash event.
            - If there is no target, this will be null.

        public ability udg_SDEventAbility
            - This is the dash ability of a dash event.
            - Included because the editor uses this variable type in some instances.

        public integer udg_SDEventAbilityId
            - This is the dash abilityId of a dash event.
            - Included because the editor uses this variable type in most instances.
            - This is an AbilityId integer variable in the editor.

        public integer udg_SDEventAbilityLevel
            - This is the level of the dash ability when the dash started.

        public real udg_SDEventCenterX
            - This is the X coordinate of the center point of the ability.

        public real udg_SDEventCenterY
            - This is the Y coordinate of the center point of the ability.

        public integer udg_SDEventCurrentPoint
            - This is the point that the dasher is currently standing on (or approaching when moving).

        public integer udg_SDEventTotalPoints
            - This is the total number of points that the star of a dash has.

        public integer udg_SDEventTick
            - This is the current tick number of the dash of a dash event.

        public integer udg_SDEventTotalTicks
            - This is the total number of ticks of the dash of a dash event.

        public integer udg_SDEventSubTick
            - This is the current sub-sequence tick number of the dash of a dash event.
            - The current subsequence can be determined by the event type, or by checking which of the remaining three variables is > 0.

        public integer udg_SDEventMoveTicks
            - This is the total number of move ticks in each move sequence of the dash of a dash event.
            - If the move sequence is not currently active, this vale will be the negative of its absolute value.

        public integer udg_SDEventTurnTicks
            - This is the total number of turn ticks in each move sequence of the dash of a dash event.
            - If the turn sequence is not currently active, this vale will be the negative of its absolute value.

        public integer udg_SDEventStandTicks
            - This is the total number of stand ticks in each move sequence of the dash of a dash event.
            - If the stand sequence is not currently active, this vale will be the negative of its absolute value.


/////////////////////////
    5. The Dash Ability
/////////////////////////

    The following section refers to the ability data of dash ability that can be edited in the Object Editor.

    The dash ability should be based on the Channel ability.

    Important Parameters:
        1. Do not use this as an item ability.
        2. "Follow Through Time" setting should be higher than the duration of the dash. It will end at the right time no matter how high you set it. Set it high.
        3. "Area of Effect" should be given a value as it will be the default value if no other radius is given when initiating the dash.
        4. "Cooldown" it is recommended that the cooldown should be longer than the duration of the dash.  The cooldown timer begins when the dash begins.
        5. "Disable Other Abilities" setting will work either way.  If set to true, abilities like "stun" and "ensnare" will not stop the dash.
        6. This system is not set up to use buffs / effects from the ability settings in object editor, use star dash events to create the ability effects.
        7. The ability target will be determined by the "Target Type" data field of the ability.
        8. Base Order Id uniqueness should be treated with the same amount of care as ever.

    Cosmetic Parameters:
        1. Animations will only play if you do not use the animation variables in the trigger editor.
        2. Art / Special Effects will work, but you may have better results using animations / effects with the star dash events in the trigger editor.


*/
JASS:
library StarDash

    globals

        //private integer sd_intA
        private integer sd_intB
        private integer sd_intC

        private unit    array    SD_SUA_U
        private integer array    SD_SUA_C
        private integer array    SD_SUA_A
        private integer            SD_SUA_N = 0
        private timer            SD_SUA_T = CreateTimer()

        private integer sd_dashCount = 0
        private timer   sd_dashTicker = CreateTimer()
        private boolean sd_isTickerOn = false
        private real    SD_TICK_TIMEOUT = 0.03

        private ability array sd_dashAbility        //
        private boolean array sd_isPaused            //
        private boolean array sd_noReturn            //    *Input
        private integer array sd_dashAbilityLevel    //
        private integer    array sd_starType            //    Input
        private integer    array sd_dashAbilityId        //
        private integer    array sd_dashOrderId        //
        private real    array sd_dashArc            //    *Input
        private real    array sd_dashHover            //    *Input
        private real    array sd_dashRadius            //    *Input

        private integer    array sd_moveTicks            //    Input
        private integer    array sd_turnTicks            //    Input
        private integer    array sd_waitTicks            //    Input
        private integer    array sd_dashTicks            //

        private unit    array sd_dashCaster            //
        private real    array sd_casterMoveSpeed    //
        private real    array sd_casterTurnSpeed    //
        private real    array sd_casterFlyHeight    //

        private integer    array sd_moveAnimI            //    *Input
        private integer    array sd_turnAnimI            //    *Input
        private integer    array sd_waitAnimI            //    *Input
        private real    array sd_moveAnimR            //    *Input
        private real    array sd_turnAnimR            //    *Input
        private real    array sd_waitAnimR            //    *Input

        private unit    array sd_dashTarget            //    Input Option A
        private real    array sd_dashCenterX        //    Input Option B, X of udg_SDashStarCenter
        private real    array sd_dashCenterY        //    Input Option B, Y of udg_SDashStarCenter
        private real    array sd_dashAngle            //    Input Option C, Input nothing and use Caster position and angle
        private real    array sd_dashReturnX        //
        private real    array sd_dashReturnY        //

    endglobals

    private function SD_CallEvent takes integer i, real e returns nothing
        local integer a = sd_dashTicks[i] / ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] )

        set udg_SDEventCaster = sd_dashCaster[i]
        set udg_SDEventTarget = sd_dashTarget[i]
        set udg_SDEventCenterX = sd_dashCenterX[i]
        set udg_SDEventAbility = sd_dashAbility[i]
        set udg_SDEventAbilityId = sd_dashAbilityId[i]
        set udg_SDEventAbilityLevel = sd_dashAbilityLevel[i]
        set udg_SDEventTotalPoints = sd_starType[i]
        set udg_SDEventTotalTicks = sd_starType[i] * ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] ) + sd_waitTicks[i]
        set udg_SDEventCurrentPoint = sd_starType[i] - a

        set a = sd_dashTicks[i] - a * ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] )

        if a >= sd_turnTicks[i] + sd_waitTicks[i] then
            set a = a - sd_turnTicks[i] - sd_waitTicks[i]

            set udg_SDEventMoveTicks = sd_moveTicks[i]
            set udg_SDEventTurnTicks = 0 - sd_turnTicks[i]
            set udg_SDEventStandTicks = 0 - sd_waitTicks[i]

            set udg_SDEventTick = udg_SDEventTotalTicks - sd_dashTicks[i]
            set udg_SDEventSubTick = sd_moveTicks[i] - a
        elseif a >= sd_waitTicks[i] then
            set a = a - sd_waitTicks[i]

            set udg_SDEventMoveTicks = 0 - sd_moveTicks[i]
            set udg_SDEventTurnTicks = sd_turnTicks[i]
            set udg_SDEventStandTicks = 0 - sd_waitTicks[i]

            set udg_SDEventTick = udg_SDEventTotalTicks - sd_dashTicks[i]
            set udg_SDEventSubTick = sd_turnTicks[i] - a
        else
            set udg_SDEventMoveTicks = 0 - sd_moveTicks[i]
            set udg_SDEventTurnTicks = 0 - sd_turnTicks[i]
            set udg_SDEventStandTicks = sd_waitTicks[i]

            set udg_SDEventTick = udg_SDEventTotalTicks - sd_dashTicks[i]
            set udg_SDEventSubTick = sd_waitTicks[i] - a
        endif

        set udg_StarDashEvent = -1.00
        set udg_StarDashEvent = e
    endfunction

    private function SD_SUA_TF takes nothing returns nothing
        local integer i = 0
        loop
            exitwhen i >= SD_SUA_N
            call BlzUnitDisableAbility( SD_SUA_U[i], SD_SUA_A[i], false, false )
            if SD_SUA_C[i] > 0 then
                call SetUnitState( SD_SUA_U[i], UNIT_STATE_MANA, GetUnitState( SD_SUA_U[i], UNIT_STATE_MANA ) + SD_SUA_C[i] )
            endif
            set SD_SUA_A[i] = 0
            set SD_SUA_C[i] = 0
            set SD_SUA_U[i] = null
            set i = i + 1
        endloop
        set SD_SUA_N = 0
    endfunction

    private function SD_StopUnitAbility takes unit u, integer a, boolean refund returns nothing
        call BlzUnitDisableAbility( u, a, true, false )
        set SD_SUA_U[SD_SUA_N] = u
        set SD_SUA_A[SD_SUA_N] = a
        if refund then
            set SD_SUA_C[SD_SUA_N] = BlzGetUnitAbilityManaCost( u, a, GetUnitAbilityLevel( u, a ) - 1 )
        endif
        set SD_SUA_N = SD_SUA_N + 1
        call TimerStart( SD_SUA_T, 0.00, false, function SD_SUA_TF )
    endfunction

    private function SD_EnableMobility takes integer i returns nothing
        if not sd_noReturn[i] then
            call SetUnitX( sd_dashCaster[i], sd_dashReturnX[i] )
            call SetUnitY( sd_dashCaster[i], sd_dashReturnY[i] )
        endif
        call UnitRemoveAbility( sd_dashCaster[i], udg_SDGlobalSpellImmunity )
        call UnitRemoveAbility( sd_dashCaster[i], udg_SDGlobalInvulnerability )
        call SetUnitPathing( sd_dashCaster[i], true )
        call BlzSetUnitRealField( sd_dashCaster[i], UNIT_RF_SPEED, sd_casterMoveSpeed[i] )
        call BlzSetUnitRealField( sd_dashCaster[i], UNIT_RF_TURN_RATE, sd_casterTurnSpeed[i] )
        call SetUnitFlyHeight( sd_dashCaster[i], sd_casterFlyHeight[i], 0 )
        call SetUnitAnimationByIndex( sd_dashCaster[i], 0 )
        call SetUnitTimeScale( sd_dashCaster[i], 1 )
    endfunction

    private function SD_RemoveDasher takes integer i returns boolean
        if i > sd_dashCount then
            return false
        endif

        call SD_StopUnitAbility( sd_dashCaster[i], sd_dashAbilityId[i], false )

        if sd_isPaused[i] then
            call SD_CallEvent( i, 6.00 )
        elseif sd_dashTicks[i] > 0 then
            call SD_EnableMobility( i )
            call SD_CallEvent( i, 7.00 )
        else
            call SD_EnableMobility( i )
            call SD_CallEvent( i, 0.00 )
        endif

        set sd_dashCount = sd_dashCount - 1

        set sd_dashAbility[i] = sd_dashAbility[sd_dashCount]
        set sd_isPaused[i] = sd_isPaused[sd_dashCount]
        set sd_noReturn[i] = sd_noReturn[sd_dashCount]
        set sd_dashAbilityLevel[i] = sd_dashAbilityLevel[sd_dashCount]
        set sd_starType[i] = sd_starType[sd_dashCount]
        set sd_dashAbilityId[i] = sd_dashAbilityId[sd_dashCount]
        set sd_dashOrderId[i] = sd_dashOrderId[sd_dashCount]
        set sd_dashArc[i] = sd_dashArc[sd_dashCount]
        set sd_dashHover[i] = sd_dashHover[sd_dashCount]
        set sd_dashRadius[i] = sd_dashRadius[sd_dashCount]

        set sd_moveTicks[i] = sd_moveTicks[sd_dashCount]
        set sd_turnTicks[i] = sd_turnTicks[sd_dashCount]
        set sd_waitTicks[i] = sd_waitTicks[sd_dashCount]
        set sd_dashTicks[i] = sd_dashTicks[sd_dashCount]

        set sd_dashCaster[i] = sd_dashCaster[sd_dashCount]
        set sd_casterMoveSpeed[i] = sd_casterMoveSpeed[sd_dashCount]
        set sd_casterTurnSpeed[i] = sd_casterTurnSpeed[sd_dashCount]
        set sd_casterFlyHeight[i] = sd_casterFlyHeight[sd_dashCount]

        set sd_moveAnimI[i] = sd_moveAnimI[sd_dashCount]
        set sd_turnAnimI[i] = sd_turnAnimI[sd_dashCount]
        set sd_waitAnimI[i] = sd_waitAnimI[sd_dashCount]
        set sd_moveAnimR[i] = sd_moveAnimR[sd_dashCount]
        set sd_turnAnimR[i] = sd_turnAnimR[sd_dashCount]
        set sd_waitAnimR[i] = sd_waitAnimR[sd_dashCount]

        set sd_dashTarget[i] = sd_dashTarget[sd_dashCount]
        set sd_dashCenterX[i] = sd_dashCenterX[sd_dashCount]
        set sd_dashCenterY[i] = sd_dashCenterY[sd_dashCount]
        set sd_dashReturnX[i] = sd_dashReturnX[sd_dashCount]
        set sd_dashReturnY[i] = sd_dashReturnY[sd_dashCount]
        set sd_dashAngle[i] = sd_dashAngle[sd_dashCount]

        //
        set sd_dashAbility[sd_dashCount] = null
        set sd_isPaused[sd_dashCount] = false
        set sd_noReturn[sd_dashCount] = false
        set sd_dashAbilityLevel[sd_dashCount] = 0
        set sd_starType[sd_dashCount] = 0
        set sd_dashAbilityId[sd_dashCount] = 0
        set sd_dashOrderId[sd_dashCount] = 0
        set sd_dashArc[sd_dashCount] = 0
        set sd_dashHover[sd_dashCount] = 0
        set sd_dashRadius[sd_dashCount] = 0

        set sd_moveTicks[sd_dashCount] = 0
        set sd_turnTicks[sd_dashCount] = 0
        set sd_waitTicks[sd_dashCount] = 0
        set sd_dashTicks[sd_dashCount] = 0

        set sd_dashCaster[sd_dashCount] = null
        set sd_casterMoveSpeed[sd_dashCount] = 0
        set sd_casterTurnSpeed[sd_dashCount] = 0
        set sd_casterFlyHeight[sd_dashCount] = 0

        set sd_moveAnimI[sd_dashCount] = 0
        set sd_turnAnimI[sd_dashCount] = 0
        set sd_waitAnimI[sd_dashCount] = 0
        set sd_moveAnimR[sd_dashCount] = 0
        set sd_turnAnimR[sd_dashCount] = 0
        set sd_waitAnimR[sd_dashCount] = 0

        set sd_dashTarget[sd_dashCount] = null
        set sd_dashCenterX[sd_dashCount] = 0
        set sd_dashCenterY[sd_dashCount] = 0
        set sd_dashReturnX[sd_dashCount] = 0
        set sd_dashReturnY[sd_dashCount] = 0
        set sd_dashAngle[sd_dashCount] = 0

        return true
    endfunction

    private function SD_DashTick takes integer i returns nothing
        local integer a = sd_dashTicks[i] / ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] )
        local integer b = sd_starType[i] - a
        local real x
        local real y
        local real z

        // set a = number of ticks remaining in current sub-sequence.
        set a = sd_dashTicks[i] - a * ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] )
        if a >= sd_turnTicks[i] + sd_waitTicks[i] then
            // move sub-sequence
            set a = a - sd_turnTicks[i] - sd_waitTicks[i]
            set x = bj_PI - bj_PI / sd_starType[i]
            set y = Cos( x ) - 1
            set z = Sin( x )
            set y = sd_dashRadius[i] * SquareRoot( y * y + z * z ) / sd_moveTicks[i]
            set z = sd_dashAngle[i] + ( ( ( 2 * ( b - 1 ) + 1 ) * x - bj_PI ) / 2 )
            call SetUnitX( sd_dashCaster[i], GetUnitX( sd_dashCaster[i] ) + Cos( z ) * y )
            call SetUnitY( sd_dashCaster[i], GetUnitY( sd_dashCaster[i] ) + Sin( z ) * y )
            if sd_starType[i] == 1 then
                set z = z + bj_PI / 2
            endif
            if sd_dashArc[i] != 0 then
                set x = sd_moveTicks[i] / 2
                set y = x - a
                set y = ( x - SquareRoot( y * y ) ) / x
                set x = sd_dashArc[i] * y
                call SetUnitFlyHeight( sd_dashCaster[i], sd_casterFlyHeight[i] + sd_dashHover[i] + x, 0 )
            endif
            if a == sd_moveTicks[i] - 1 then
                call BlzSetUnitFacingEx( sd_dashCaster[i], 180 * z / bj_PI )
                if sd_moveAnimR[i] >= 0.00 then
                    call SetUnitAnimationByIndex( sd_dashCaster[i], sd_moveAnimI[i] )
                    call SetUnitTimeScale( sd_dashCaster[i], sd_moveAnimR[i] )
                endif
            endif
            call SD_CallEvent( i, 2.00 )
        elseif a >= sd_waitTicks[i] then
            // turn sub-sequence.
            set a = a - sd_waitTicks[i]
            set x = sd_dashAngle[i] + b * ( bj_PI - bj_PI / sd_starType[i] )
            set y = sd_dashRadius[i] * Cos( x )
            set z = sd_dashRadius[i] * Sin( x )
            set x = x - a * bj_PI * ( 1 - 1 / ( 2 * x ) ) / sd_turnTicks[i]
            if sd_starType[i] == 1 then
                set x = x + bj_PI / 2
            endif
            call BlzSetUnitFacingEx( sd_dashCaster[i], 180 * x / bj_PI )
            if a == sd_turnTicks[i] - 1 then
                call SetUnitX( sd_dashCaster[i], sd_dashCenterX[i] - y )
                call SetUnitY( sd_dashCaster[i], sd_dashCenterY[i] - z )
                if sd_turnAnimR[i] >= 0.00 then
                    call SetUnitAnimationByIndex( sd_dashCaster[i], sd_turnAnimI[i] )
                    call SetUnitTimeScale( sd_dashCaster[i], sd_turnAnimR[i] )
                endif
            endif
            call SD_CallEvent( i, 3.00 )
        else
            // wait sub-sequence.
            if a == sd_waitTicks[i] - 1 then
                if sd_starType[i] == 1 then
                    call BlzSetUnitFacingEx( sd_dashCaster[i], 180 * sd_dashAngle[i] / bj_PI )
                endif
                if sd_waitAnimR[i] >= 0.00 then
                    call SetUnitAnimationByIndex( sd_dashCaster[i], sd_waitAnimI[i] )
                    call SetUnitTimeScale( sd_dashCaster[i], sd_waitAnimR[i] )
                endif
            endif
            call SD_CallEvent( i, 4.00 )
        endif
    endfunction

    private function SD_ForDashTickerLoop takes integer i returns integer
        local integer o = GetUnitCurrentOrder( sd_dashCaster[i] )
        local integer a
        if sd_dashTicks[i] < 1 or o != sd_dashOrderId[i] or sd_isPaused[i] then
            if o == 851973 or sd_isPaused[i] then
                if not sd_isPaused[i] then
                    set sd_isPaused[i] = true
                    call SD_EnableMobility( i )
                    call SD_CallEvent( i, 5.00 )
                endif
                if o != 851973 then
                    if o != sd_dashOrderId[i] then
                        call SD_RemoveDasher( i )
                        return i
                    else
                        call SD_StopUnitAbility( sd_dashCaster[i], sd_dashAbilityId[i], false )
                    endif
                endif
            else
                call SD_RemoveDasher( i )
                return i
            endif
            set sd_isTickerOn = true
            return i + 1
        endif

        set sd_dashTicks[i] = sd_dashTicks[i] - 1
        set a = sd_dashTicks[i] / ( sd_moveTicks[i] + sd_turnTicks[i] + sd_waitTicks[i] )
        call SD_DashTick( i )

        set sd_isTickerOn = true
        return i + 1
    endfunction

    private function SD_DashTicker takes nothing returns nothing
        local integer i = 0
        local real a
        local real b
        local real c
        set sd_isTickerOn = false
        loop
            exitwhen i >= sd_dashCount
            set i = SD_ForDashTickerLoop( i )
        endloop
        if sd_isTickerOn then
            call TimerStart( sd_dashTicker, udg_SDGlobalTickRate, false, function SD_DashTicker )
        endif
    endfunction

    function SD_GetVectorAngle takes real x, real y returns real
        if x == 0 then
            if y == 0 then
                return -1.0 // if angle < 0 the vector = 0
            else
                if y > 0 then
                    return bj_PI / 2
                else
                    return 3 * bj_PI / 2
                endif
            endif
        else // x1 <> x2
            if y < 0 then
                return Atan2( y, x ) + 2 * bj_PI
            else
                return Atan2( y, x )
            endif
        endif
    endfunction

    private function SD_GetDasherIndex takes unit u returns integer
        local integer i = 0
        loop
            exitwhen i >= sd_dashCount
            if u == sd_dashCaster[i] then
                set u = null
                return i
            endif
            set i = i + 1
        endloop
        set u = null
        return -1
    endfunction

    function SD_CancelDash takes unit u returns boolean
        local integer i = SD_GetDasherIndex( u )
        set u = null
        if i < 0 or sd_isPaused[i] == true then
            return false
        endif
        return SD_RemoveDasher( i )
    endfunction

    function SD_InitiateDash takes nothing returns nothing
        local integer a = GetSpellAbilityId()
        local integer m = udg_SDashMode
        local unit u = GetSpellAbilityUnit()
        local unit t = GetSpellTargetUnit()
        local location p = GetSpellTargetLoc()
        local real tempx = GetUnitX( u )
        local real tempy = GetUnitY( u )

        if SD_GetDasherIndex( u ) < 0 then
            if m < 0 then
                set m = 0 - m
            endif
            set m = m * 2 + 1

            set sd_dashAbility[sd_dashCount] = GetSpellAbility()
            set sd_isPaused[sd_dashCount] = false
            set sd_noReturn[sd_dashCount] = udg_SDashKeepNewLocation
            set sd_dashAbilityLevel[sd_dashCount] = GetUnitAbilityLevel( u, GetSpellAbilityId() )
            set sd_starType[sd_dashCount] = m
            set sd_dashAbilityId[sd_dashCount] = a
            set sd_dashOrderId[sd_dashCount] = GetUnitCurrentOrder( u )
            set sd_dashArc[sd_dashCount] = udg_SDashJumpHeight
            set sd_dashHover[sd_dashCount] = udg_SDashHoverHeight
            if udg_SDashStarRadius > 0 then
                set sd_dashRadius[sd_dashCount] = udg_SDashStarRadius
            else
                set sd_dashRadius[sd_dashCount] = BlzGetAbilityRealLevelField( GetSpellAbility(), ABILITY_RLF_AREA_OF_EFFECT, sd_dashAbilityLevel[sd_dashCount] - 1 )
            endif

            set sd_moveTicks[sd_dashCount] = udg_SDashMoveTicks
            set sd_turnTicks[sd_dashCount] = udg_SDashTurnTicks
            set sd_waitTicks[sd_dashCount] = udg_SDashStandTicks
            set sd_dashTicks[sd_dashCount] = m * ( udg_SDashMoveTicks + udg_SDashTurnTicks + udg_SDashStandTicks ) + udg_SDashStandTicks

            set sd_dashCaster[sd_dashCount] = u
            set sd_casterMoveSpeed[sd_dashCount] = BlzGetUnitRealField( u, UNIT_RF_SPEED )
            set sd_casterTurnSpeed[sd_dashCount] = BlzGetUnitRealField( u, UNIT_RF_TURN_RATE )
            set sd_casterFlyHeight[sd_dashCount] = BlzGetUnitRealField( u, UNIT_RF_FLY_HEIGHT )

            set sd_moveAnimI[sd_dashCount] = udg_SDashMoveAnimationIndex
            set sd_turnAnimI[sd_dashCount] = udg_SDashTurnAnimationIndex
            set sd_waitAnimI[sd_dashCount] = udg_SDashStandAnimationIndex
            set sd_moveAnimR[sd_dashCount] = udg_SDashMoveAnimationRate
            set sd_turnAnimR[sd_dashCount] = udg_SDashTurnAnimationRate
            set sd_waitAnimR[sd_dashCount] = udg_SDashStandAnimationRate

            set sd_dashReturnX[sd_dashCount] = tempx
            set sd_dashReturnY[sd_dashCount] = tempy

            if t == null then
                set sd_dashCenterX[sd_dashCount] = GetLocationX( p )
                set sd_dashCenterY[sd_dashCount] = GetLocationY( p )
                set tempx = sd_dashCenterX[sd_dashCount] - tempx
                set tempy = sd_dashCenterY[sd_dashCount] - tempy
                set sd_dashAngle[sd_dashCount] = SD_GetVectorAngle( tempx, tempy )
                if sd_dashAngle[sd_dashCount] < 0 then
                    set sd_dashAngle[sd_dashCount] = bj_PI * GetUnitFacing( u ) / 360
                endif
            else
                if t == null or t == u then
                    set sd_dashCenterX[sd_dashCount] = tempx
                    set sd_dashCenterY[sd_dashCount] = tempy
                    set sd_dashAngle[sd_dashCount] = bj_PI * GetUnitFacing( u ) / 360
                else
                    set sd_dashTarget[sd_dashCount] = t
                    set sd_dashCenterX[sd_dashCount] = GetUnitX( t )
                    set sd_dashCenterY[sd_dashCount] = GetUnitY( t )
                    set tempx = sd_dashCenterX[sd_dashCount] - tempx
                    set tempy = sd_dashCenterY[sd_dashCount] - tempy
                    set sd_dashAngle[sd_dashCount] = SD_GetVectorAngle( tempx, tempy )
                    if sd_dashAngle[sd_dashCount] < 0 then
                        set sd_dashAngle[sd_dashCount] = bj_PI * GetUnitFacing( u ) / 360
                    endif
                endif
            endif

            // remove collision and add invulnerabilities
            call SetUnitPathing( u, false )
            call BlzSetUnitRealField( u, UNIT_RF_SPEED, 0 )
            call BlzSetUnitRealField( u, UNIT_RF_TURN_RATE, 0 )
            if udg_SDashIsSpellImmune then
                call UnitAddAbility( u, udg_SDGlobalSpellImmunity )
            endif
            if udg_SDashIsInvulnerable then
                call UnitAddAbility( u, udg_SDGlobalInvulnerability )
            endif
            call SetUnitX( u, sd_dashCenterX[sd_dashCount] - sd_dashRadius[sd_dashCount] * Cos( sd_dashAngle[sd_dashCount] ) )
            call SetUnitY( u, sd_dashCenterY[sd_dashCount] - sd_dashRadius[sd_dashCount] * Sin( sd_dashAngle[sd_dashCount] ) )
            if sd_dashHover[sd_dashCount] != 0 or sd_dashArc[sd_dashCount] != 0 then
                if UnitAddAbility( u, 'Arav' ) then
                    call UnitRemoveAbility( u, 'Arav' )
                endif
                call SetUnitFlyHeight( u, sd_casterFlyHeight[sd_dashCount] + sd_dashHover[sd_dashCount], 0 )
            endif

            // move counter and begin dash
            set sd_dashCount = sd_dashCount + 1
            if not sd_isTickerOn then
                set sd_isTickerOn = true
                call TimerStart( sd_dashTicker, udg_SDGlobalTickRate, false, function SD_DashTicker )
                call SD_CallEvent( sd_dashCount - 1, 1 )
            endif
        else
            call SD_StopUnitAbility( u, a, true )
        endif

        set udg_SDashMode = 0
        set udg_SDashMoveTicks = 0
        set udg_SDashTurnTicks = 0
        set udg_SDashStandTicks = 0
        set udg_SDashStarRadius = 0.00
        set udg_SDashJumpHeight = 0.00
        set udg_SDashHoverHeight = 0.00
        set udg_SDashKeepNewLocation = false
        set udg_SDashIsInvulnerable = false
        set udg_SDashIsSpellImmune = false
        set udg_SDashMoveAnimationIndex = 0
        set udg_SDashMoveAnimationRate = -1.00
        set udg_SDashTurnAnimationIndex = 0
        set udg_SDashTurnAnimationRate = -1.00
        set udg_SDashStandAnimationIndex = 0
        set udg_SDashStandAnimationRate = -1.00

        call RemoveLocation( p )
        set u = null
        set t = null
    endfunction

endlibrary
  • Technically these triggers are not necessary for the system itself, but are examples of how the system may be used.
    • It is expected and advised that this system is adapted to the user's preference.
    • The following triggers are listed for the sake of discussion and are not considered as part of this system.
  • Hero Star Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Star Strike (Hero)
    • Actions
      • Set VariableSet SDashMode = 2
      • Set VariableSet SDashMoveTicks = 10
      • Set VariableSet SDashStandTicks = 10
      • Set VariableSet SDashTurnTicks = 10
      • Set VariableSet SDashKeepNewLocation = False
      • Set VariableSet SDashIsInvulnerable = True
      • Set VariableSet SDashIsSpellImmune = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Lich
        • Then - Actions
          • Set VariableSet SDashMoveAnimationIndex = 8
          • Set VariableSet SDashMoveAnimationRate = 10.00
          • Set VariableSet SDashTurnAnimationIndex = 4
          • Set VariableSet SDashTurnAnimationRate = 1.00
          • Set VariableSet SDashStandAnimationIndex = 5
          • Set VariableSet SDashStandAnimationRate = 1.00
          • Set VariableSet SDashHoverHeight = 100.00
          • Set VariableSet SDashJumpHeight = 150.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Paladin
        • Then - Actions
          • Set VariableSet SDashMoveAnimationIndex = 12
          • Set VariableSet SDashMoveAnimationRate = 3.50
          • Set VariableSet SDashTurnAnimationIndex = 7
          • Set VariableSet SDashTurnAnimationRate = 4.00
          • Set VariableSet SDashStandAnimationIndex = 8
          • Set VariableSet SDashStandAnimationRate = 5.00
          • Set VariableSet SDashHoverHeight = 0.00
          • Set VariableSet SDashJumpHeight = 0.00
        • Else - Actions
      • Custom script: call SD_InitiateDash()
  • Unit Star Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Star Strike (Unit)
    • Actions
      • Set VariableSet SDashMode = 0
      • Set VariableSet SDashMoveTicks = 0
      • Set VariableSet SDashStandTicks = 10
      • Set VariableSet SDashTurnTicks = 10
      • Set VariableSet SDashKeepNewLocation = True
      • Set VariableSet SDashIsInvulnerable = False
      • Set VariableSet SDashIsSpellImmune = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Gargoyle
        • Then - Actions
          • Set VariableSet SDashMoveAnimationIndex = 2
          • Set VariableSet SDashMoveAnimationRate = 5.00
          • Set VariableSet SDashTurnAnimationIndex = 6
          • Set VariableSet SDashTurnAnimationRate = 10.00
          • Set VariableSet SDashStandAnimationIndex = 7
          • Set VariableSet SDashStandAnimationRate = 1.00
          • Set VariableSet SDashHoverHeight = 0.00
          • Set VariableSet SDashJumpHeight = -150.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Lich
        • Then - Actions
          • Set VariableSet SDashMoveAnimationIndex = 8
          • Set VariableSet SDashMoveAnimationRate = 5.00
          • Set VariableSet SDashTurnAnimationIndex = 4
          • Set VariableSet SDashTurnAnimationRate = 1.00
          • Set VariableSet SDashStandAnimationIndex = 5
          • Set VariableSet SDashStandAnimationRate = 1.00
          • Set VariableSet SDashHoverHeight = 100.00
          • Set VariableSet SDashJumpHeight = 150.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Casting unit)) Equal to Paladin
        • Then - Actions
          • Set VariableSet SDashMoveAnimationIndex = 9
          • Set VariableSet SDashMoveAnimationRate = 2.50
          • Set VariableSet SDashTurnAnimationIndex = 7
          • Set VariableSet SDashTurnAnimationRate = 1.00
          • Set VariableSet SDashStandAnimationIndex = 8
          • Set VariableSet SDashStandAnimationRate = 1.00
          • Set VariableSet SDashHoverHeight = 0.00
          • Set VariableSet SDashJumpHeight = 200.00
        • Else - Actions
      • Custom script: call SD_InitiateDash()
  • Star Dash HeroHealHurt
    • Events
      • Game - StarDashEvent becomes Equal to 4.00
    • Conditions
      • SDEventAbilityId Equal to Star Strike (Hero)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (SDEventCaster is Undead) Equal to True
        • Then - Actions
          • Unit - Cause SDEventCaster to damage SDEventTarget, dealing (2.50 x (Real(SDEventAbilityLevel))) damage of attack type Chaos and damage type Universal
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SDEventSubTick Equal to 1
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of SDEventTarget using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
          • Unit - Set life of SDEventTarget to ((Life of SDEventTarget) + (2.50 x (Real(SDEventAbilityLevel))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SDEventSubTick Equal to 1
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of SDEventTarget using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
  • Star Dash UnitSwoopJump
    • Events
      • Game - StarDashEvent becomes Equal to 2.00
    • Conditions
      • SDEventAbilityId Equal to Star Strike (Unit)
      • SDEventSubTick Equal to 5
    • Actions
      • Unit - Cause SDEventCaster to damage SDEventTarget, dealing 25.00 damage of attack type Chaos and damage type Universal
      • Special Effect - Create a special effect attached to the origin of SDEventTarget using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
      • Special Effect - Destroy (Last created special effect)
  • Cancel Dash
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set VariableSet SDEventCaster = Lich 0011 <gen>
      • Custom script: call SD_CancelDash( udg_SDEventCaster )
The following triggers are all turned off in the demo map by default, they were made to test and display the dash event data.
  • End Dash
    • Events
      • Game - StarDashEvent becomes Equal to 0.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (End dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
  • Begin Dash
    • Events
      • Game - StarDashEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Begin dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
  • Stunned
    • Events
      • Game - StarDashEvent becomes Equal to 5.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Stunned dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SDEventMoveTicks Greater than 0
        • Then - Actions
          • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventMoveTicks)) + move ticks.)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SDEventTurnTicks Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventTurnTicks)) + turn ticks.)))
            • Else - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventStandTicks)) + stand ticks.)))
  • Stun Cleared
    • Events
      • Game - StarDashEvent becomes Equal to 6.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Stun cleared for dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SDEventMoveTicks Greater than 0
        • Then - Actions
          • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventMoveTicks)) + move ticks.)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SDEventTurnTicks Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventTurnTicks)) + turn ticks.)))
            • Else - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventStandTicks)) + stand ticks.)))
  • Interrupt
    • Events
      • Game - StarDashEvent becomes Equal to 7.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Interrupted dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SDEventMoveTicks Greater than 0
        • Then - Actions
          • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventMoveTicks)) + move ticks.)))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SDEventTurnTicks Greater than 0
            • Then - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventTurnTicks)) + turn ticks.)))
            • Else - Actions
              • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventStandTicks)) + stand ticks.)))
  • Move Tick
    • Events
      • Game - StarDashEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Move tick for dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: (Point + (((String(SDEventCurrentPoint)) + of ) + (String(SDEventTotalPoints))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventMoveTicks)) + move ticks.)))
  • Turn Tick
    • Events
      • Game - StarDashEvent becomes Equal to 3.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Turn tick for dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: (Point + (((String(SDEventCurrentPoint)) + of ) + (String(SDEventTotalPoints))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventTurnTicks)) + turn ticks.)))
  • Stand Tick
    • Events
      • Game - StarDashEvent becomes Equal to 4.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text:
      • Game - Display to (All players) the text: (Stand tick for dash + ((Ability: SDEventAbility's String Field: Name ('anam')) + ( level + (String(SDEventAbilityLevel)))))
      • Game - Display to (All players) the text: (Caster: + (Name of SDEventCaster))
      • Game - Display to (All players) the text: (Target: + (Name of SDEventTarget))
      • Game - Display to (All players) the text: (Center Coordinates: ( + (((Parse (String(SDEventCenterX))) + , ) + ((String(SDEventCenterY)) + ))))
      • Game - Display to (All players) the text: (Point + (((String(SDEventCurrentPoint)) + of ) + (String(SDEventTotalPoints))))
      • Game - Display to (All players) the text: ((String(SDEventTick)) + ( of + ((String(SDEventTotalTicks)) + total ticks.)))
      • Game - Display to (All players) the text: ((String(SDEventSubTick)) + ( of + ((String(SDEventStandTicks)) + stand ticks.)))
 

Attachments

  • StarStrike.w3m
    44.1 KB · Views: 0
Last edited:
Top