• 🏆 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] i need help with knockback

Status
Not open for further replies.
Level 11
Joined
Sep 12, 2008
Messages
657
hey... im trying to make spell that if a unit comes within ### range it gets knocked out.. (i can add damage alone.)
heres what i did:
  • Unit Group - Pick every unit in Kaiten_Group and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Picked unit) Not equal to Kaiten_Caster
        • Then - Actions
          • Unit - Move (Picked unit) instantly to (Kaiten_Caster_Point offset by 15.00 towards 30.00 degrees)
        • Else - Actions
kaiten_caster_point = the caster position
kaiten_caster = the casting unit
kaiten_group = the units withing ### range...
can you help me please? thanks.
if you need more info tell me and ill write more..
btw.. i used 15 towards 30 degrees just to see if it realy moves him.. but it doesnt..
 
Last edited:
Level 11
Joined
Sep 12, 2008
Messages
657
kk here it is:
  • Kaiten Init
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Set Kaiten_ManaSteal = 4.00
      • Set Kaiten_Damage = (((Real((Level of Eight Triagram Rotation (R) for Byakugan_Caster))) x 15.00) - Kaiten_ManaSteal)
      • Set Kaiten_Damage_NoMana = ((Real((Level of Eight Triagram Rotation (R) for Byakugan_Caster))) x 15.00)
      • Set Kaiten_Group = (Units within 700.00 of Kaiten_Caster_Point)
      • Set Kaiten_Rotation = Rotation special effect
  • Kaiten Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Eight Triagram Rotation (R)
    • Actions
      • Set Kaiten_Caster = (Casting unit)
      • Set Kaiten_Caster_Point = (Position of Kaiten_Caster)
      • Unit - Create 1 Kaiten_Rotation for (Owner of Kaiten_Caster) at Kaiten_Caster_Point facing (Random angle) degrees
      • Set Kaiten_Rotation_Unit = (Last created unit)
      • Unit - Add a 0.70 second Generic expiration timer to Kaiten_Rotation_Unit
      • Trigger - Turn on Kaiten Loop <gen>
  • Kaiten Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Make Kaiten_Rotation_Unit face (Random angle) over 0.00 seconds
      • Unit Group - Pick every unit in Kaiten_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Picked unit) Not equal to Kaiten_Caster
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (Kaiten_Caster_Point offset by 15.00 towards 30.00 degrees)
            • Else - Actions
Edited from every 1 seconds of game time to 3..
 
Level 18
Joined
Feb 28, 2009
Messages
1,970
What exactly is not working?

P.S. Don`t use
  • Time - Every 0.01 seconds of game time
Coz it can cause lags. Use
  • Time - Every 0.02 seconds of game time
or
  • Time - Every 0.03 seconds of game time
There is no difference between this two.
 
Level 11
Joined
Sep 12, 2008
Messages
657
well.. whats the diffrence?
in my first knockback
i used same idea.. and it worked..
but i just didnt use picked unit
i used that the targeted unit of ability behind cast will:

  • Psychic Knockback
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Unit - Move temp_unit_target instantly to (temp_point offset by ((Distance between temp_point and (Position of temp_unit_target)) + 15.00) towards (Angle from temp_point to (Position of temp_unit_target)) degrees)
      • Wait 0.02 game-time seconds
      • Special Effect - Create a special effect at (Position of temp_unit_target) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
and to cheak when cast:

  • Psychic Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Knockback
    • Actions
      • Set temp_unit = (Casting unit)
      • Set temp_unit_target = (Target unit of ability being cast)
      • Set temp_point = (Position of temp_unit)
      • Set temp_real = (Facing of temp_unit)
      • Unit - Make temp_unit Invulnerable
      • Trigger - Turn on Psychic Knockback <gen>
      • Wait 1.00 game-time seconds
      • Trigger - Turn off Psychic Knockback <gen>
      • Unit - Move temp_unit instantly to ((Position of temp_unit_target) offset by 80.00 towards temp_real degrees)
      • Set temp_point = (Position of temp_unit)
      • Wait 0.20 game-time seconds
      • Unit - Make temp_unit face temp_unit_target over 0.50 seconds
      • Wait 0.50 game-time seconds
      • Animation - Play temp_unit's attack animation
      • Special Effect - Create a special effect at (Position of temp_unit_target) using Objects\Spawnmodels\NightElf\NECancelDeath\NECancelDeath.mdl
      • Set temp_effect = (Last created special effect)
      • Special Effect - Destroy temp_effect
      • Trigger - Turn on Psychic Knockback <gen>
      • Wait 1.00 game-time seconds
      • Unit - Make temp_unit Vulnerable
      • Trigger - Turn off Psychic Knockback <gen>
      • Custom script: call RemoveLocation(udg_temp_point)
      • Custom script: set udg_temp_unit = null
 
Status
Not open for further replies.
Top