• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] call SetUnitX & Y problems

Status
Not open for further replies.
Level 6
Joined
Aug 14, 2016
Messages
174
  • Sweeping Blade Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SweepingBladeLoop) from 1 to SweepingBladeInt, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SweepingBladeBoolean[SweepingBladeLoop] Equal to True
            • Then - Actions
              • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s stand animation
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SweepingBladeDistance[SweepingBladeLoop] Less than or equal to SweepingBladeLim[SweepingBladeLoop]
                • Then - Actions
                  • Set SweepingBladeDistance[SweepingBladeLoop] = (SweepingBladeDistance[SweepingBladeLoop] + SweepingBladeDashSpeed[SweepingBladeLoop])
                  • Unit Group - Pick every unit in SweepingBladeCastGroup[SweepingBladeLoop] and do (Actions)
                    • Loop - Actions
                      • Hashtable - Save ((475.00 - SweepingBladeDistance[SweepingBladeLoop]) / (SweepingBladeDashSpeed[SweepingBladeLoop] x 50.00)) as (Key 3) of (Key (Picked unit)) in SweepingBladeTimerHash
                  • Set SweepingBladePoint[0] = (Position of SweepingBladeCaster[SweepingBladeLoop])
                  • Set SweepingBladePoint[1] = (Position of SweepingBladeTarget[SweepingBladeLoop])
                  • Set SweepingBladePoint[2] = (SweepingBladePoint[0] offset by SweepingBladeDashSpeed[SweepingBladeLoop] towards SweepingBladeAngle[SweepingBladeLoop] degrees)
                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                    • Then - Actions
                      • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s Spell Channel animation
                      • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 300.00% of its original speed
                    • Else - Actions
                      • Animation - Change SweepingBladeCaster[SweepingBladeLoop] flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between SweepingBladePoint[0] and SweepingBladePoint[1]) Less than or equal to 175.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (SweepingBladeTarget[SweepingBladeLoop] is in SweepingBladeMarkGroup[SweepingBladeLoop]) Equal to False
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                            • Then - Actions
                              • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                              • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                              • Selection - Select SweepingBladeCaster[SweepingBladeLoop] for (Owner of SweepingBladeCaster[SweepingBladeLoop])
                              • Sound - Play SBSoundsImpact[(Random integer number between 1 and 4)] at 100.00% volume, skipping the first 0.00 seconds
                              • Unit - Add Spell Detection to SweepingBladeCaster[SweepingBladeLoop]
                              • Unit - Cause SweepingBladeCaster[SweepingBladeLoop] to damage SweepingBladeTarget[SweepingBladeLoop], dealing (SweepingBladeDamage[SweepingBladeLoop] x (1.00 + (0.25 x (Real(SweepingBladeTime[SweepingBladeLoop]))))) damage of attack type Spells and damage type Magic
                              • Unit - Remove Spell Detection from SweepingBladeCaster[SweepingBladeLoop]
                              • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                              • Unit - Create 1 Sweeping Blade Effect 2 for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing Default building facing degrees
                              • Unit - Add a 0.65 second Generic expiration timer to (Last created unit)
                              • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                              • Unit - Add Wind Mark to (Last created unit)
                              • Unit - Set level of Wind Mark for (Last created unit) to (Level of Sweeping Blade for SweepingBladeCaster[SweepingBladeLoop])
                              • Unit - Order (Last created unit) to Human Sorceress - Slow SweepingBladeTarget[SweepingBladeLoop]
                            • Else - Actions
                              • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                              • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                              • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                              • Unit - Create 1 R Effect for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing (Random angle) degrees
                              • Animation - Change (Last created unit) flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                              • Animation - Change (Last created unit)'s vertex coloring to (20.00%, 20.00%, 100.00%) with 0.00% transparency
                              • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                              • Animation - Change (Last created unit)'s size to (40.00%, 40.00%, 40.00%) of its original size
                        • Else - Actions
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Equal to R Effect 3
                    • Then - Actions
                      • Unit - Kill SweepingBladeCaster[SweepingBladeLoop]
                    • Else - Actions
                  • Unit - Turn collision for SweepingBladeCaster[SweepingBladeLoop] On
                  • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 100.00% of its original speed
                  • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s animation
                  • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s body-part facing
                  • Custom script: call UnitRemoveAbility( udg_SweepingBladeCaster[udg_SweepingBladeLoop], 'Abun' )
                  • Set SweepingBladeDistance[SweepingBladeLoop] = 0.00
                  • Set SweepingBladeBoolean[SweepingBladeLoop] = False
                  • Set SweepingBladeIndex = (SweepingBladeIndex - 1)
                  • Unit - Remove E Detection from SweepingBladeCaster[SweepingBladeLoop]
                  • Unit Group - Remove all units from SweepingBladeMarkGroup[SweepingBladeLoop]
                  • Unit Group - Remove all units from SweepingBladeCastGroup[SweepingBladeLoop]
                  • Custom script: call DestroyGroup(udg_SweepingBladeMarkGroup[udg_SweepingBladeLoop])
                  • Custom script: call DestroyGroup(udg_SweepingBladeCastGroup[udg_SweepingBladeLoop])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SweepingBladeIndex Equal to 0
                    • Then - Actions
                      • Set SweepingBladeInt = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
I push 2 code:
Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
and
Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))

but Yasuo still dash on boundary, anyone know how to fix it?
YasuoDashGlitch.jpeg
 
Level 6
Joined
Aug 14, 2016
Messages
174
SetUnitX/Y does not care about pathing you'll need to check if the coordinate is pathable before making the move.
Oh, so i need remove Call SetUnitX/Y?, but they got a Special Passive: Push enemies in-front it. :(
 
Level 6
Joined
Aug 14, 2016
Messages
174
You don't need to remove it, you just need to check so you push them at the proper times.

You can incorporate something like below to make sure where the unit is being pushed should be allowed.

Check Walkability
After i using Check Walkability KD3872.jpg the attack icons is disable when i using silence, because i need silence to stop Yasuo dealing x2 damage when dash and attack.
  • Sweeping Blade Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • -------- Set CP_Point to the point you want to check for walkability --------
      • Set CP_Point = (Position of SweepingBladeCaster[SweepingBladeInt])
      • -------- Run "Check Walkability" --------
      • Trigger - Run Check Walkability <gen> (ignoring conditions)
      • -------- If CP_PointIsWalkable is true, then the point is walkable --------
      • -------- If it is false, then it isn't pathable. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CP_PointIsWalkable Equal to True
        • Then - Actions
          • For each (Integer SweepingBladeLoop) from 1 to SweepingBladeInt, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SweepingBladeBoolean[SweepingBladeLoop] Equal to True
                • Then - Actions
                  • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s stand animation
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SweepingBladeDistance[SweepingBladeLoop] Less than or equal to SweepingBladeLim[SweepingBladeLoop]
                    • Then - Actions
                      • Set SweepingBladeDistance[SweepingBladeLoop] = (SweepingBladeDistance[SweepingBladeLoop] + SweepingBladeDashSpeed[SweepingBladeLoop])
                      • Unit Group - Pick every unit in SweepingBladeCastGroup[SweepingBladeLoop] and do (Actions)
                        • Loop - Actions
                          • Hashtable - Save ((475.00 - SweepingBladeDistance[SweepingBladeLoop]) / (SweepingBladeDashSpeed[SweepingBladeLoop] x 50.00)) as (Key 3) of (Key (Picked unit)) in SweepingBladeTimerHash
                      • Set SweepingBladePoint[0] = (Position of SweepingBladeCaster[SweepingBladeLoop])
                      • Set SweepingBladePoint[1] = (Position of SweepingBladeTarget[SweepingBladeLoop])
                      • Set SweepingBladePoint[2] = (SweepingBladePoint[0] offset by SweepingBladeDashSpeed[SweepingBladeLoop] towards SweepingBladeAngle[SweepingBladeLoop] degrees)
                      • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                      • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                        • Then - Actions
                          • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s Spell Channel animation
                          • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 300.00% of its original speed
                        • Else - Actions
                          • Animation - Change SweepingBladeCaster[SweepingBladeLoop] flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between SweepingBladePoint[0] and SweepingBladePoint[1]) Less than or equal to 175.00
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (SweepingBladeTarget[SweepingBladeLoop] is in SweepingBladeMarkGroup[SweepingBladeLoop]) Equal to False
                            • Then - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                                • Then - Actions
                                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                                  • Selection - Select SweepingBladeCaster[SweepingBladeLoop] for (Owner of SweepingBladeCaster[SweepingBladeLoop])
                                  • Sound - Play SBSoundsImpact[(Random integer number between 1 and 4)] at 100.00% volume, skipping the first 0.00 seconds
                                  • Unit - Add Spell Detection to SweepingBladeCaster[SweepingBladeLoop]
                                  • Unit - Cause SweepingBladeCaster[SweepingBladeLoop] to damage SweepingBladeTarget[SweepingBladeLoop], dealing (SweepingBladeDamage[SweepingBladeLoop] x (1.00 + (0.25 x (Real(SweepingBladeTime[SweepingBladeLoop]))))) damage of attack type Spells and damage type Magic
                                  • Unit - Remove Spell Detection from SweepingBladeCaster[SweepingBladeLoop]
                                  • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                                  • Unit - Create 1 Sweeping Blade Effect 2 for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing Default building facing degrees
                                  • Unit - Add a 0.65 second Generic expiration timer to (Last created unit)
                                  • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                                  • Unit - Add Wind Mark to (Last created unit)
                                  • Unit - Set level of Wind Mark for (Last created unit) to (Level of Sweeping Blade for SweepingBladeCaster[SweepingBladeLoop])
                                  • Unit - Order (Last created unit) to Human Sorceress - Slow SweepingBladeTarget[SweepingBladeLoop]
                                • Else - Actions
                                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                                  • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                                  • Unit - Create 1 R Effect for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing (Random angle) degrees
                                  • Animation - Change (Last created unit) flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                                  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                                  • Animation - Change (Last created unit)'s vertex coloring to (20.00%, 20.00%, 100.00%) with 0.00% transparency
                                  • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                                  • Animation - Change (Last created unit)'s size to (40.00%, 40.00%, 40.00%) of its original size
                            • Else - Actions
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Equal to R Effect 3
                        • Then - Actions
                          • Unit - Kill SweepingBladeCaster[SweepingBladeLoop]
                        • Else - Actions
                      • Unit - Turn collision for SweepingBladeCaster[SweepingBladeLoop] On
                      • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 100.00% of its original speed
                      • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s animation
                      • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s body-part facing
                      • Custom script: call UnitRemoveAbility( udg_SweepingBladeCaster[udg_SweepingBladeLoop], 'Abun' )
                      • Set SweepingBladeDistance[SweepingBladeLoop] = 0.00
                      • Set SweepingBladeBoolean[SweepingBladeLoop] = False
                      • Set SweepingBladeIndex = (SweepingBladeIndex - 1)
                      • Unit - Remove E Detection from SweepingBladeCaster[SweepingBladeLoop]
                      • Unit Group - Remove all units from SweepingBladeMarkGroup[SweepingBladeLoop]
                      • Unit Group - Remove all units from SweepingBladeCastGroup[SweepingBladeLoop]
                      • Custom script: call DestroyGroup(udg_SweepingBladeMarkGroup[udg_SweepingBladeLoop])
                      • Custom script: call DestroyGroup(udg_SweepingBladeCastGroup[udg_SweepingBladeLoop])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • SweepingBladeIndex Equal to 0
                        • Then - Actions
                          • Set SweepingBladeInt = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
        • Else - Actions
          • For each (Integer SweepingBladeLoop) from 1 to SweepingBladeInt, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SweepingBladeBoolean[SweepingBladeLoop] Equal to True
                • Then - Actions
                  • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s stand animation
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SweepingBladeDistance[SweepingBladeLoop] Less than or equal to SweepingBladeLim[SweepingBladeLoop]
                    • Then - Actions
                      • Set SweepingBladeDistance[SweepingBladeLoop] = (SweepingBladeDistance[SweepingBladeLoop] + SweepingBladeDashSpeed[SweepingBladeLoop])
                      • Unit Group - Pick every unit in SweepingBladeCastGroup[SweepingBladeLoop] and do (Actions)
                        • Loop - Actions
                          • Hashtable - Save ((475.00 - SweepingBladeDistance[SweepingBladeLoop]) / (SweepingBladeDashSpeed[SweepingBladeLoop] x 50.00)) as (Key 3) of (Key (Picked unit)) in SweepingBladeTimerHash
                      • Set SweepingBladePoint[0] = (Position of SweepingBladeCaster[SweepingBladeLoop])
                      • Set SweepingBladePoint[1] = (Position of SweepingBladeTarget[SweepingBladeLoop])
                      • Set SweepingBladePoint[2] = (SweepingBladePoint[0] offset by SweepingBladeDashSpeed[SweepingBladeLoop] towards SweepingBladeAngle[SweepingBladeLoop] degrees)
                      • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                      • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                        • Then - Actions
                          • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s Spell Channel animation
                          • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 300.00% of its original speed
                        • Else - Actions
                          • Animation - Change SweepingBladeCaster[SweepingBladeLoop] flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between SweepingBladePoint[0] and SweepingBladePoint[1]) Less than or equal to 175.00
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (SweepingBladeTarget[SweepingBladeLoop] is in SweepingBladeMarkGroup[SweepingBladeLoop]) Equal to False
                            • Then - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                                • Then - Actions
                                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                                  • Selection - Select SweepingBladeCaster[SweepingBladeLoop] for (Owner of SweepingBladeCaster[SweepingBladeLoop])
                                  • Sound - Play SBSoundsImpact[(Random integer number between 1 and 4)] at 100.00% volume, skipping the first 0.00 seconds
                                  • Unit - Add Spell Detection to SweepingBladeCaster[SweepingBladeLoop]
                                  • Unit - Cause SweepingBladeCaster[SweepingBladeLoop] to damage SweepingBladeTarget[SweepingBladeLoop], dealing (SweepingBladeDamage[SweepingBladeLoop] x (1.00 + (0.25 x (Real(SweepingBladeTime[SweepingBladeLoop]))))) damage of attack type Spells and damage type Magic
                                  • Unit - Remove Spell Detection from SweepingBladeCaster[SweepingBladeLoop]
                                  • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                                  • Unit - Create 1 Sweeping Blade Effect 2 for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing Default building facing degrees
                                  • Unit - Add a 0.65 second Generic expiration timer to (Last created unit)
                                  • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                                  • Unit - Add Wind Mark to (Last created unit)
                                  • Unit - Set level of Wind Mark for (Last created unit) to (Level of Sweeping Blade for SweepingBladeCaster[SweepingBladeLoop])
                                  • Unit - Order (Last created unit) to Human Sorceress - Slow SweepingBladeTarget[SweepingBladeLoop]
                                • Else - Actions
                                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
                                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
                                  • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                                  • Unit - Create 1 R Effect for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing (Random angle) degrees
                                  • Animation - Change (Last created unit) flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                                  • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                                  • Animation - Change (Last created unit)'s vertex coloring to (20.00%, 20.00%, 100.00%) with 0.00% transparency
                                  • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                                  • Animation - Change (Last created unit)'s size to (40.00%, 40.00%, 40.00%) of its original size
                            • Else - Actions
                        • Else - Actions
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Equal to R Effect 3
                        • Then - Actions
                          • Unit - Kill SweepingBladeCaster[SweepingBladeLoop]
                        • Else - Actions
                      • Unit - Turn collision for SweepingBladeCaster[SweepingBladeLoop] On
                      • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 100.00% of its original speed
                      • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s animation
                      • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s body-part facing
                      • Custom script: call UnitRemoveAbility( udg_SweepingBladeCaster[udg_SweepingBladeLoop], 'Abun' )
                      • Set SweepingBladeDistance[SweepingBladeLoop] = 0.00
                      • Set SweepingBladeBoolean[SweepingBladeLoop] = False
                      • Set SweepingBladeIndex = (SweepingBladeIndex - 1)
                      • Unit - Remove E Detection from SweepingBladeCaster[SweepingBladeLoop]
                      • Unit Group - Remove all units from SweepingBladeMarkGroup[SweepingBladeLoop]
                      • Unit Group - Remove all units from SweepingBladeCastGroup[SweepingBladeLoop]
                      • Custom script: call DestroyGroup(udg_SweepingBladeMarkGroup[udg_SweepingBladeLoop])
                      • Custom script: call DestroyGroup(udg_SweepingBladeCastGroup[udg_SweepingBladeLoop])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                      • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • SweepingBladeIndex Equal to 0
                        • Then - Actions
                          • Set SweepingBladeInt = 0
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Equal to R Effect 3
            • Then - Actions
              • Unit - Kill SweepingBladeCaster[SweepingBladeLoop]
            • Else - Actions
          • Unit - Turn collision for SweepingBladeCaster[SweepingBladeLoop] On
          • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 100.00% of its original speed
          • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s animation
          • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s body-part facing
          • Custom script: call UnitRemoveAbility( udg_SweepingBladeCaster[udg_SweepingBladeLoop], 'Abun' )
          • Set SweepingBladeDistance[SweepingBladeLoop] = 0.00
          • Set SweepingBladeBoolean[SweepingBladeLoop] = False
          • Set SweepingBladeIndex = (SweepingBladeIndex - 1)
          • Unit - Remove E Detection from SweepingBladeCaster[SweepingBladeLoop]
          • Unit Group - Remove all units from SweepingBladeMarkGroup[SweepingBladeLoop]
          • Unit Group - Remove all units from SweepingBladeCastGroup[SweepingBladeLoop]
          • Custom script: call DestroyGroup(udg_SweepingBladeMarkGroup[udg_SweepingBladeLoop])
          • Custom script: call DestroyGroup(udg_SweepingBladeCastGroup[udg_SweepingBladeLoop])
          • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
          • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
          • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SweepingBladeIndex Equal to 0
            • Then - Actions
              • Set SweepingBladeInt = 0
              • Trigger - Turn off (This trigger)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_CP_Point)
Sweeping Blade is stopping Dash on Boundary and Ciff, but attack icons is disable.
  • Check Walkability Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set CP_Rect = (Region(0.00, 0.00, 128.00, 128.00))
      • Custom script: set udg_CP_Item = CreateItem('wtlg', 0, 0)
      • Item - Hide CP_Item
      • -------- Variables For Copy and Paste --------
      • Set CP_HiddenItemsIndex = 0
      • Set CP_HiddenItems[0] = No item
      • Set CP_Point = (Position of SweepingBladeCaster[SweepingBladeInt])
      • Set CP_PointIsWalkable = False
This is all system from Check Walkability

  • Check Walkability
    • Events
    • Conditions
    • Actions
      • Custom script: local real x = GetLocationX(udg_CP_Point)
      • Custom script: local real y = GetLocationY(udg_CP_Point)
      • Custom script: local real x2 = 0
      • Custom script: local real y2 = 0
      • Custom script: call MoveRectTo(udg_CP_Rect, x, y)
      • Item - Pick every item in CP_Rect and do (Actions)
        • Loop - Actions
          • Custom script: if IsItemVisible(GetEnumItem()) then
          • Set CP_HiddenItems[CP_HiddenItemsIndex] = (Picked item)
          • Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], false)
          • Set CP_HiddenItemsIndex = (CP_HiddenItemsIndex + 1)
          • Custom script: endif
      • Custom script: call SetItemPosition(udg_CP_Item, x, y)
      • Custom script: set x2 = GetItemX(udg_CP_Item)
      • Custom script: set y2 = GetItemY(udg_CP_Item)
      • Custom script: call SetItemVisible(udg_CP_Item, false)
      • Custom script: loop
      • Custom script: exitwhen udg_CP_HiddenItemsIndex <= 0
      • Custom script: set udg_CP_HiddenItemsIndex = udg_CP_HiddenItemsIndex - 1
      • Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], true)
      • Custom script: set udg_CP_HiddenItems[udg_CP_HiddenItemsIndex] = null
      • Custom script: endloop
      • Custom script: set udg_CP_PointIsWalkable = ((x2-x)*(x2-x) + (y2-y)*(y2-y) <= 100) and (not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY))
 

Attachments

  • upload_2018-5-19_14-46-53.png
    upload_2018-5-19_14-46-53.png
    103.1 KB · Views: 43
Level 6
Joined
Aug 14, 2016
Messages
174
Aw, this spell is too hard?, if anyone dosen't has any ideas, i will remove check walkability and the leaks dash on boundary & ciff will follow it :(.
 
Shouldn't you check the next position instead of the current one? You wana stop him from moving onto a unpathable.

You wana mimic yasou's spell sweeping blade, but well yasou's charge is a predefined movement in the direction of the target at spellcast with a static distance traveled. Cause of that fact you won't need to check pathability during the movement instead find the distance the current charge shall travel using the pathchecks at spellcast.

Edit:
Sweeping Blade starts at 1:18

Is that an error? In your code sometimes you use
"SweepingBladeCaster[SweepingBladeInt]" instead of "SweepingBladeCaster[SweepingBladeLoop]".

You set X/Y twice onto the same x/y:
Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))
 
Last edited:
Level 6
Joined
Aug 14, 2016
Messages
174
Shouldn't you check the next position instead of the current one? You wana stop him from moving onto a unpathable.

You wana mimic yasou's spell sweeping blade, but well yasou's charge is a predefined movement in the direction of the target at spellcast with a static distance traveled. Cause of that fact you won't need to check pathability during the movement instead find the distance the current charge shall travel using the pathchecks at spellcast.

Edit:
Sweeping Blade starts at 1:18

Is that an error? In your code sometimes you use
"SweepingBladeCaster[SweepingBladeInt]" instead of "SweepingBladeCaster[SweepingBladeLoop]".

You set X/Y twice onto the same x/y:
Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationX(udg_SweepingBladePoint[2]))
Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeLoop], GetLocationY(udg_SweepingBladePoint[2]))

No man, i just using those code to push out boundary, when dash on ciff, yasuo passed it.
 
Level 6
Joined
Aug 14, 2016
Messages
174
Is that an error? In your code sometimes you use
"SweepingBladeCaster[SweepingBladeInt]" instead of "SweepingBladeCaster[SweepingBladeLoop]".
And, ok i'm admit, sorry about that "SweepingBladeCaster[SweepingBladeInt]" instead of "SweepingBladeCaster[SweepingBladeLoop]", sometime i edit, i'm forgot a small trigger.
 
Level 6
Joined
Aug 14, 2016
Messages
174
upload_2018-5-19_0-6-8.png
Aw, not again
  • Sweeping Blade Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SweepingBladeLoop) from 1 to SweepingBladeInt, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SweepingBladeBoolean[SweepingBladeLoop] Equal to True
            • Then - Actions
              • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s stand animation
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SweepingBladeDistance[SweepingBladeLoop] Less than or equal to SweepingBladeLim[SweepingBladeLoop]
                • Then - Actions
                  • Set SweepingBladeDistance[SweepingBladeLoop] = (SweepingBladeDistance[SweepingBladeLoop] + SweepingBladeDashSpeed[SweepingBladeLoop])
                  • Unit Group - Pick every unit in SweepingBladeCastGroup[SweepingBladeLoop] and do (Actions)
                    • Loop - Actions
                      • Hashtable - Save ((475.00 - SweepingBladeDistance[SweepingBladeLoop]) / (SweepingBladeDashSpeed[SweepingBladeLoop] x 50.00)) as (Key 3) of (Key (Picked unit)) in SweepingBladeTimerHash
                  • Set SweepingBladePoint[0] = (Position of SweepingBladeCaster[SweepingBladeLoop])
                  • Set SweepingBladePoint[1] = (Position of SweepingBladeTarget[SweepingBladeLoop])
                  • Set SweepingBladePoint[2] = (SweepingBladePoint[0] offset by SweepingBladeDashSpeed[SweepingBladeLoop] towards SweepingBladeAngle[SweepingBladeLoop] degrees)
                  • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationX(udg_SweepingBladePoint[2]))
                  • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationY(udg_SweepingBladePoint[2]))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                    • Then - Actions
                      • Animation - Play SweepingBladeCaster[SweepingBladeInt]'s Spell Channel animation
                      • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 300.00% of its original speed
                    • Else - Actions
                      • Animation - Change SweepingBladeCaster[SweepingBladeLoop] flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between SweepingBladePoint[0] and SweepingBladePoint[1]) Less than or equal to 175.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (SweepingBladeTarget[SweepingBladeLoop] is in SweepingBladeMarkGroup[SweepingBladeLoop]) Equal to False
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Not equal to R Effect 3
                            • Then - Actions
                              • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationX(udg_SweepingBladePoint[2]))
                              • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationY(udg_SweepingBladePoint[2]))
                              • Selection - Select SweepingBladeCaster[SweepingBladeLoop] for (Owner of SweepingBladeCaster[SweepingBladeLoop])
                              • Sound - Play SBSoundsImpact[(Random integer number between 1 and 4)] at 100.00% volume, skipping the first 0.00 seconds
                              • Unit - Add Spell Detection to SweepingBladeCaster[SweepingBladeLoop]
                              • Unit - Cause SweepingBladeCaster[SweepingBladeLoop] to damage SweepingBladeTarget[SweepingBladeLoop], dealing (SweepingBladeDamage[SweepingBladeLoop] x (1.00 + (0.25 x (Real(SweepingBladeTime[SweepingBladeLoop]))))) damage of attack type Spells and damage type Magic
                              • Unit - Remove Spell Detection from SweepingBladeCaster[SweepingBladeLoop]
                              • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                              • Unit - Create 1 Sweeping Blade Effect 2 for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing Default building facing degrees
                              • Unit - Add a 0.65 second Generic expiration timer to (Last created unit)
                              • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                              • Unit - Add Wind Mark to (Last created unit)
                              • Unit - Set level of Wind Mark for (Last created unit) to (Level of Sweeping Blade for SweepingBladeCaster[SweepingBladeLoop])
                              • Unit - Order (Last created unit) to Human Sorceress - Slow SweepingBladeTarget[SweepingBladeLoop]
                            • Else - Actions
                              • Custom script: call SetUnitX(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationX(udg_SweepingBladePoint[2]))
                              • Custom script: call SetUnitY(udg_SweepingBladeCaster[udg_SweepingBladeInt], GetLocationY(udg_SweepingBladePoint[2]))
                              • Unit Group - Add SweepingBladeTarget[SweepingBladeLoop] to SweepingBladeMarkGroup[SweepingBladeLoop]
                              • Unit - Create 1 R Effect for (Owner of SweepingBladeCaster[SweepingBladeLoop]) at SweepingBladePoint[1] facing (Random angle) degrees
                              • Animation - Change (Last created unit) flying height to (Current flying height of SweepingBladeTarget[SweepingBladeLoop]) at 0.00
                              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                              • Animation - Change (Last created unit)'s vertex coloring to (20.00%, 20.00%, 100.00%) with 0.00% transparency
                              • Animation - Change (Last created unit)'s animation speed to 200.00% of its original speed
                              • Animation - Change (Last created unit)'s size to (40.00%, 40.00%, 40.00%) of its original size
                        • Else - Actions
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of SweepingBladeCaster[SweepingBladeLoop]) Equal to R Effect 3
                    • Then - Actions
                      • Unit - Kill SweepingBladeCaster[SweepingBladeLoop]
                    • Else - Actions
                  • Unit - Turn collision for SweepingBladeCaster[SweepingBladeLoop] On
                  • Animation - Change SweepingBladeCaster[SweepingBladeInt]'s animation speed to 100.00% of its original speed
                  • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s animation
                  • Animation - Reset SweepingBladeCaster[SweepingBladeLoop]'s body-part facing
                  • Custom script: call UnitRemoveAbility( udg_SweepingBladeCaster[udg_SweepingBladeLoop], 'Abun' )
                  • Set SweepingBladeDistance[SweepingBladeLoop] = 0.00
                  • Set SweepingBladeBoolean[SweepingBladeLoop] = False
                  • Set SweepingBladeIndex = (SweepingBladeIndex - 1)
                  • Unit - Remove E Detection from SweepingBladeCaster[SweepingBladeLoop]
                  • Unit Group - Remove all units from SweepingBladeMarkGroup[SweepingBladeLoop]
                  • Unit Group - Remove all units from SweepingBladeCastGroup[SweepingBladeLoop]
                  • Custom script: call DestroyGroup(udg_SweepingBladeMarkGroup[udg_SweepingBladeLoop])
                  • Custom script: call DestroyGroup(udg_SweepingBladeCastGroup[udg_SweepingBladeLoop])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[0])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[1])
                  • Custom script: call RemoveLocation(udg_SweepingBladePoint[2])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SweepingBladeIndex Equal to 0
                    • Then - Actions
                      • Set SweepingBladeInt = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
 
Level 6
Joined
Aug 14, 2016
Messages
174
  • Unit - Move (Triggering unit) instantly to (Center of (Playable map area))
Use this instead of SetUnitX/Y if you need collision and having a hard time setting up CheckWalkability (shouldn't be hard actually)
Oh, i using this system, it very imposible but yes, i don't using Move instanly :D
  • Unit Group - Pick every unit in SweepingBladeCastGroup[SweepingBladeLoop] and do (Actions)
    • Loop - Actions
      • Hashtable - Save ((475.00 - SweepingBladeDistance[SweepingBladeLoop]) / (SweepingBladeDashSpeed[SweepingBladeLoop] x 50.00)) as (Key 3) of (Key (Picked unit)) in SweepingBladeTimerHash
Without i using
  • Unit - Move (Triggering unit) instantly to (Center of (Playable map area))
The dash will smoothing and can combo E + Q
upload_2018-5-21_6-33-11.png

upload_2018-5-21_6-34-26.png
LOL XD
 

Attachments

  • upload_2018-5-21_6-33-34.png
    upload_2018-5-21_6-33-34.png
    1.4 MB · Views: 37
  • upload_2018-5-21_6-34-2.png
    upload_2018-5-21_6-34-2.png
    1.4 MB · Views: 14
Level 9
Joined
Sep 20, 2015
Messages
385
hi, maybe im too late but to check walkability you can use the experience book thing. Basically create an expereince book in the point you need to check, and if the point isn't pathable the game will automatically create the item where it's pathale, then you just need to set the point to last created item point. i used this method on my map for a dash spell
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
hi, maybe im too late but to check walkability you can use the experience book thing. Basically create an expereince book in the point you need to check, and if the point isn't pathable the game will automatically create the item where it's pathale, then you just need to set the point to last created item point. i used this method on my map for a dash spell

Please, don't do this.
I assume you are talking Tome of Experience here ? Tomes, as we all know leak. There are systems created to diminish the leaks created by such items. A much better approach would be to use a dummy unit, or just us some custom functions to check pathability directly.

regards
-Ned
 
Level 6
Joined
Aug 14, 2016
Messages
174
I just need 1 thing:stop dashing on boundary, push out when stop dashing on middle-ciff, doodads and unit.
 
Status
Not open for further replies.
Top