• 🏆 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] Help Please

Status
Not open for further replies.
Level 5
Joined
Apr 14, 2008
Messages
92
Hello everybody. I was just wondering wether some1 would be kind enough to point out whats wrong in my trigger. What i want to happen, is my hero to make a clone, wait a couple of seconds, then the clone dies and the hero creates a swirling ball in one hand. Then When i tell him to attack another unit, it should run up to it and do one attack; knocking back the unit for a second or so while doing damage. However, my problem is hell do the spell even when really far away, the target will still get knocked back. I'd really appreciate some help; i m really a beginner at GUI triggers.

Rasengan Clone
Events
Unit - A unit Begins channeling an ability
Conditions
(Ability being cast) Equal to Rasengan
Actions
Unit - Create 1 Naruto Clone for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
----------------------------------------------------------------------
Rasengan Extra Kill
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Rasengan
Actions
Unit - Cause (Triggering unit) to damage circular area after 0.01 seconds of radius 500.00 at (Position of (Triggering unit)), dealing 1.00 damage of attack type Spells and damage type Normal
Trigger - Turn on Knockback <gen>
-----------------------------------------------------------------------
Knockback
Events
Unit - A unit Is issued an order targeting an object
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between Location and TargetPoint) Less than or equal to 5.00
(Issued order) Equal to (Order(attack))
Then - Actions
Set TargetPoint = (Target point of issued order)
Set Attacker = (Triggering unit)
Set Location = (Position of (Triggering unit))
Set Target = (Target unit of issued order)
Unit - Move Attacker instantly to TargetPoint
Trigger - Turn on Push <gen>
Unit - Cause Attacker to damage Target, dealing 500.00 damage of attack type Spells and damage type Universal
Unit - Remove Positive buffs from Attacker
Wait 2.00 seconds
Trigger - Turn off Push <gen>
Unit - Turn collision for Target On
Custom script: call RemoveLocation(udg_Location)
Trigger - Turn off (This trigger)
Else - Actions
Do nothing
-----------------------------------------------------------------------
Push
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Special Effect - Create a special effect at (Position of Target) using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at TargetPoint using Razengan.mdx
Unit - Turn collision for Target Off
Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees), facing Default building facing degrees
-----------------------------------------------------------------------

Thanks in advance,

~darke_fyre
 
Level 35
Joined
Oct 9, 2006
Messages
6,392
Did it for you... Now it should be easier to see and help

  • Rasengan Clone
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Rasengan
    • Actions
      • Unit - Create 1 Naruto Clone for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
  • Rasengan Extra Kill
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Rasengan
    • Actions
      • Unit - Cause (Triggering unit) to damage circular area after 0.01 seconds of radius 500.00 at (Position of (Triggering unit)), dealing 1.00 damage of attack type Spells and damage type Normal
      • Trigger - Turn on Knockback <gen>
  • Knockback
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Location and TargetPoint) Less than or equal to 5.00
          • (Issued order) Equal to (Order(attack))
        • Then - Actions
          • Set TargetPoint = (Target point of issued order)
          • Set Attacker = (Triggering unit)
          • Set Location = (Position of (Triggering unit))
          • Set Target = (Target unit of issued order)
          • Unit - Move Attacker instantly to TargetPoint
          • Trigger - Turn on Push <gen>
          • Unit - Cause Attacker to damage Target, dealing 500.00 damage of attack type Spells and damage type Universal
          • Unit - Remove Positive buffs from Attacker
          • Wait 2.00 seconds
          • Trigger - Turn off Push <gen>
          • Unit - Turn collision for Target On
          • Custom script: call RemoveLocation(udg_Location)
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
  • Push
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Special Effect - Create a special effect at (Position of Target) using Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at TargetPoint using Razengan.mdx
      • Unit - Turn collision for Target Off
      • Unit - Move Target instantly to (Location offset by ((Distance between Location and (Position of Target)) + 5.00) towards (Angle from Location to (Position of Target)) degrees), facing Default building facing degrees
But If I understand you correct your trigger works right, except for the fact that he can hit targets far away from the hero. That leads me to the conclusion that you have set to far a range for the ability which activates your trigger spell. Just change your abilitys attack range and the trouble should be solves, If I did understand you correct :smile:
 
Level 11
Joined
Apr 6, 2008
Messages
760
First

  • Rasengan Clone
  • Events
  • Unit - A unit Begins channeling an ability
  • Conditions
  • (Ability being cast) Equal to Rasengan
  • Actions
  • Unit - Create 1 Naruto Clone for Neutral Passive at (Target point of ability being cast) facing (Position of (Triggering unit))
this leak two location do:

  • Rasengan Clone
  • Events
  • Unit - A unit Begins channeling an ability
  • Conditions
  • (Ability being cast) Equal to Rasengan
  • Actions
  • Set TempPoint = (Target point of ability being cast)
  • Set TempPoint2 = (Position of (Triggering unit)
  • Unit - Create 1 Naruto Clone for Neutral Passive at TempPoint facing TempPoint2)
  • Custom script: call RemoveLocation(udg_TempPoint)
  • Custom script: call RemoveLocation(udg_TempPoint2)
please hold while solveing the other problems.
 
Level 35
Joined
Oct 9, 2006
Messages
6,392
Thanks Ciebron! I just fixed that leak. Also, before, RED BARON said to minimize the ability cast range: well, i cant do that bcause i based the ability on bloodlust.


~darke_fyre

Base it on something else then, it is always best for a trigger spell to be based on a spell with range... Can't take that long to change it to something else.
 
Status
Not open for further replies.
Top