• 🏆 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!

[Trigger] Charge Knockback Spell

Status
Not open for further replies.
Level 6
Joined
Apr 20, 2016
Messages
215
  • Combo Initiation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kaneki Combo
    • Actions
      • -------- Set Vars --------
      • Set Combo_INDEX = (Combo_INDEX + 1)
      • Set Combo_MUI = (Combo_MUI + 1)
      • Set ComboOn[Combo_MUI] = True
      • Set ComboCaster[Combo_MUI] = (Casting unit)
      • Set ComboCasterPos = (Position of ComboCaster[Combo_MUI])
      • Set ComboTarget[Combo_MUI] = (Target unit of ability being cast)
      • Set ComboTargetPoint = (Position of ComboTarget[Combo_MUI])
      • Set ComboDistance[Combo_MUI] = ((Distance between ComboCasterPos and ComboTargetPoint) - 100.00)
      • Set ComboAngle[Combo_MUI] = (Angle from ComboCasterPos to ComboTargetPoint)
      • Set ComboDistanceMoved[Combo_MUI] = 0.00
      • Set ComboSpeed = (1200.00 x 0.03)
      • -------- End Vars --------
      • Unit - Pause ComboCaster[Combo_MUI]
      • Unit - Make ComboCaster[Combo_MUI] Invulnerable
      • Unit - Turn collision for ComboCaster[Combo_MUI] Off
      • Unit - Pause ComboTarget[Combo_MUI]
      • Custom script: call RemoveLocation(udg_ComboCasterPos)
      • Custom script: call RemoveLocation(udg_ComboTargetPoint)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Combo_INDEX Equal to 1
        • Then - Actions
          • Trigger - Turn on Combo Move <gen>
        • Else - Actions
  • Combo Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Combo_LOOP) from 1 to Combo_MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ComboOn[Combo_LOOP] Equal to True
            • Then - Actions
              • Set ComboPos1 = (Position of ComboCaster[Combo_LOOP])
              • Set ComboPos2 = (ComboPos1 offset by ComboSpeed towards ComboAngle[Combo_LOOP] degrees)
              • Set Combo_MoveX[Combo_LOOP] = (X of ComboPos2)
              • Set Combo_MoveY[Combo_LOOP] = (Y of ComboPos2)
              • Set ComboDistanceMoved[Combo_LOOP] = (ComboDistanceMoved[Combo_LOOP] + ComboSpeed)
              • Custom script: call SetUnitX(udg_ComboCaster[udg_Combo_LOOP], udg_Combo_MoveX[udg_Combo_LOOP])
              • Custom script: call SetUnitY(udg_ComboCaster[udg_Combo_LOOP], udg_Combo_MoveY[udg_Combo_LOOP])
              • Animation - Play ComboCaster[Combo_LOOP]'s spell three animation
              • Custom script: call RemoveLocation(udg_ComboPos1)
              • Custom script: call RemoveLocation(udg_ComboPos2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ComboDistanceMoved[Combo_LOOP] Greater than or equal to ComboDistance[Combo_LOOP]
                • Then - Actions
                  • Set ComboOn[Combo_LOOP] = False
                  • Unit - Make ComboCaster[Combo_MUI] Invulnerable
                  • Animation - Play ComboCaster[Combo_LOOP]'s spell four animation
                  • Animation - Queue ComboCaster[Combo_LOOP]'s spell slam animation
                  • Unit - Turn collision for ComboCaster[Combo_MUI] On
                  • Unit - Create 1 Knockback Dummy for (Owner of ComboCaster[Combo_LOOP]) at (Position of ComboCaster[Combo_LOOP]) facing (Facing of ComboCaster[Combo_LOOP]) degrees
                  • Unit - Add Knockback to (Last created unit)
                  • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt ComboTarget[Combo_LOOP]
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (ComboTarget[Combo_LOOP] is dead) Equal to True
                    • Then - Actions
                      • -------- End of spell --------
                      • Unit - Turn collision for ComboCaster[Combo_MUI] On
                      • Set Combo_INDEX = (Combo_INDEX - 1)
                      • Set Combo_MUI = (Combo_MUI - 1)
                      • Set ComboOn[Combo_LOOP] = False
                      • Set ComboCaster[Combo_LOOP] = No unit
                      • Set ComboTarget[Combo_LOOP] = No unit
                      • Set ComboAngle[Combo_LOOP] = 0.00
                      • Set ComboDistance[Combo_LOOP] = 0.00
                      • Set ComboDistanceMoved[Combo_LOOP] = 0.00
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Combo_INDEX Equal to 0
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
            • Else - Actions
  • Knockback Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Knockback
    • Actions
      • -------- Set Vars --------
      • Set Knockback_INDEX = (Combo_INDEX + 1)
      • Set Knockback_MUI = (Knockback_MUI + 1)
      • Set KnockbackCaster[Knockback_MUI] = (Target unit of issued order)
      • Set KnockbackTarget[Knockback_MUI] = (Target unit of ability being cast)
      • Set KnockbackAngle[Knockback_MUI] = (Facing of KnockbackCaster[Knockback_MUI])
      • Set KnockbackCasterPos[Knockback_MUI] = (Position of KnockbackCaster[Knockback_MUI])
      • Set KnockbackMaxDistance = 200.00
      • Set KnockbackSpeed = (500.00 x 0.03)
      • Set KnockbackOn[Knockback_MUI] = True
      • -------- End Vars --------
      • Unit - Turn collision for KnockbackTarget[Knockback_MUI] Off
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Knockback_INDEX Equal to 1
        • Then - Actions
          • Trigger - Turn on Knockback <gen>
        • Else - Actions
  • Knockback
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Knockback_LOOP) from 1 to Knockback_MUI, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • KnockbackOn[Knockback_LOOP] Equal to True
            • Then - Actions
              • Set KnockbackDistance[Knockback_LOOP] = (Distance between KnockbackCasterPos[Knockback_MUI] and (Position of KnockbackTarget[Knockback_MUI]))
              • Unit - Move KnockbackTarget[Knockback_LOOP] instantly to (ComboCasterPos offset by (KnockbackDistance[Knockback_LOOP] + KnockbackSpeed) towards KnockbackAngle[Knockback_LOOP] degrees)
              • Special Effect - Create a special effect at (Position of KnockbackTarget[Knockback_LOOP]) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
            • Else - Actions
the problem here is that the dummy cast the knockback spell but doesn't move the target.
I attached the map so that you van see what I mean
 

Attachments

  • Anime Fight-Beta.w3x
    55.2 KB · Views: 39
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
This is in the knockback loop trigger
  • Unit - Move KnockbackTarget[Knockback_LOOP] instantly to (ComboCasterPos offset by (KnockbackDistance[Knockback_LOOP] + KnockbackSpeed) towards KnockbackAngle[Knockback_LOOP] degrees)
ComboCasterPos - What is this? Where did it come from? Shouldn't it be KnockbackCasterPos[Knockback_LOOP] instead? Or something around?


Also, why have you split the spell in 4 parts, 2 would be more than enough...
 
Level 6
Joined
Apr 20, 2016
Messages
215
This is in the knockback loop trigger
  • Unit - Move KnockbackTarget[Knockback_LOOP] instantly to (ComboCasterPos offset by (KnockbackDistance[Knockback_LOOP] + KnockbackSpeed) towards KnockbackAngle[Knockback_LOOP] degrees)
ComboCasterPos - What is this? Where did it come from? Shouldn't it be KnockbackCasterPos[Knockback_LOOP] instead? Or something around?


Also, why have you split the spell in 4 parts, 2 would be more than enough...
Foe the spell delay and so that I will not get confused, but I optimized it now

Probably because of this?
  • set Knockback_INDEX = (Combo_INDEX + 1)
Yup, now I know why it won't work

so this is my new update and in the last part where the character rapidly hits the enemy, the damage trigger doesn't work. It's killing my barin now please help me and check when there is a bug or leaks in it thanks.
 

Attachments

  • Anime Fight-Beta.w3x
    1.2 MB · Views: 27
Status
Not open for further replies.
Top