Sliding {how to make slide/knockback abilities?}

Status
Not open for further replies.
Here's how knockback works :

  • Knock Back
    • Events
      • Your event(attack, spell, ect)
    • Conditions
      • Your condition
    • Actions
      • Set Unit_KnockBack = (Attacked unit)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Move Unit_KnockBack instantly to ((Position of Unit_KnockBack) offset by 30.00 towards ((Facing of Unit_KnockBack) - 180.00) degrees)
          • Wait 0.05 seconds
This is just basic, I am not sure if it will work, but it is just to give an idea.

Here is a knockback spell I use :

  • Spirit Bash
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Spirit Bash for (Attacking unit)) Greater than 0
    • Actions
      • Set Abt_Unit_Bash[2] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to Abt_Int_Bash
        • Then - Actions
          • Set Abt_Int_Bash = (5 x (Level of Spirit Bash for Abt_Unit_Bash[2]))
          • Set Abt_Unit_Bash[1] = (Attacked unit)
          • Special Effect - Create a special effect attached to the chest of Abt_Unit_Bash[1] using Abilities\Spells\Human\Banish\BanishTarget.mdl
          • Set Abt_Special_Bash = (Last created special effect)
          • Special Effect - Destroy Abt_Special_Bash
          • Countdown Timer - Start Timer_Bash as a Repeating timer that will expire in 0.01 seconds
          • Wait 0.50 seconds
          • Countdown Timer - Pause Timer_Bash
        • Else - Actions
          • Do nothing
and

  • Bash Timer
    • Events
      • Time - Timer_Bash expires
    • Conditions
    • Actions
      • Unit - Move Abt_Unit_Bash[1] instantly to ((Position of Abt_Unit_Bash[1]) offset by 5.00 towards (Facing of Abt_Unit_Bash[2]) degrees)
hope it helps in any way.
 
Here's how knockback works :

  • Knock Back
    • Events
      • Your event(attack, spell, ect)
    • Conditions
      • Your condition
    • Actions
      • Set Unit_KnockBack = (Attacked unit)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Move Unit_KnockBack instantly to ((Position of Unit_KnockBack) offset by 30.00 towards ((Facing of Unit_KnockBack) - 180.00) degrees)
          • Wait 0.05 seconds
This is just basic, I am not sure if it will work, but it is just to give an idea.

Here is a knockback spell I use :

  • Spirit Bash
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Spirit Bash for (Attacking unit)) Greater than 0
    • Actions
      • Set Abt_Unit_Bash[2] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to Abt_Int_Bash
        • Then - Actions
          • Set Abt_Int_Bash = (5 x (Level of Spirit Bash for Abt_Unit_Bash[2]))
          • Set Abt_Unit_Bash[1] = (Attacked unit)
          • Special Effect - Create a special effect attached to the chest of Abt_Unit_Bash[1] using Abilities\Spells\Human\Banish\BanishTarget.mdl
          • Set Abt_Special_Bash = (Last created special effect)
          • Special Effect - Destroy Abt_Special_Bash
          • Countdown Timer - Start Timer_Bash as a Repeating timer that will expire in 0.01 seconds
          • Wait 0.50 seconds
          • Countdown Timer - Pause Timer_Bash
        • Else - Actions
          • Do nothing
and

  • Bash Timer
    • Events
      • Time - Timer_Bash expires
    • Conditions
    • Actions
      • Unit - Move Abt_Unit_Bash[1] instantly to ((Position of Abt_Unit_Bash[1]) offset by 5.00 towards (Facing of Abt_Unit_Bash[2]) degrees)
hope it helps in any way.

hmmm this is not working. and i'm don't know why
 
Well Sliding systems work like... Lets say you have a periodic timer which runs every 0.03 seconds and you have an "A" unit
You say Unit - Move A to Position with Polar offset(position of A in <direction you want to slide> with Slidespeed*timerinterval offset (timerinterval here is 0.03 that I mentioned)

This is the basic mechanizm of slide-knockback triggers

You say what should I do ?
Get a knockback system from spells section
GUI Knockback System [Paladon] v.1.60 - The Hive Workshop - A Warcraft III Modding Site
this should do fine (replies say that it works good)
 
Status
Not open for further replies.
Back
Top