Impetus

emobroken22

Member
Reaction score
3
i know impetus can only be done in vjass..so can someone make one?? i dont mind if it is in jass pls just make it easy to implement and edit...thanks ^^...

Des: A spell that enhances a unit's attacks by giving bonus damage depending on how far the caster unit is from the target (kinda like frost arrows xD).
 

Ayanami

칼리
Reaction score
288
i know impetus can only be done in vjass..so can someone make one?? i dont mind if it is in jass pls just make it easy to implement and edit...thanks ^^...

It can be easily done in GUI too. All you need is a buff placer and a GUI-Friendly Damage Detection, just like Weep's Damage Detection.
 

emobroken22

Member
Reaction score
3
but then after detecting a unit with the buff taking damage ill be causing further damage to the unit which means it will run to a loop because the unit still has the buff and the unit took damage for the second time..

EDIT:and this thread is a spell request im not asking for any help xD...no offense but thanks for ur trouble!!
 

Ayanami

칼리
Reaction score
288
but then after detecting a unit with the buff taking damage ill be causing further damage to the unit which means it will run to a loop because the unit still has the buff and the unit took damage for the second time..

EDIT:and this thread is a spell request im not asking for any help xD...

Not true. You could remove the buff from the damaged unit on the instant it is damaged. Well, here's the full trigger on the spell.

Implement Weep's GDD Snippet. Base your spell on Frost Arrows with any duration. Set the slow values to 0.00. Create 2 new buffs based on "Cold Arrows (Stacking)" and "Cold Arrows (Non-stacking)". I'll name these 2 buffs A and B. Set these 2 buffs under the buff field for your Impetus skill. Then, implement this trigger.

Trigger:
  • Impetus
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (GDD_DamagedUnit has buff A) Equal to True
          • (GDD_DamagedUnit has buff B) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Set TempPoint[1] = (Position of GDD_DamageSource)
      • Set TempPoint[2] = (Position of GDD_DamagedUnit)
      • Set TempReal = ((Distance between TempPoint[1] and TempPoint[2]) x 0.25)
      • Unit - Cause GDD_DamageSource to damage GDD_DamagedUnit, dealing TempReal damage of attack type Chaos and damage type Universal
      • Floating Text - Create floating text that reads (|cff3399ff+ + (String((Integer(TempReal))))) above GDD_DamagedUnit with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 2.50 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
      • Custom script: call RemoveLocation(udg_TempPoint[1])
      • Custom script: call RemoveLocation(udg_TempPoint[2])
      • Unit - Remove A buff from GDD_DamagedUnit
      • Unit - Remove B buff from GDD_DamagedUnit
      • Trigger - Turn on (This trigger)


TempReal is a real variable representing the damage dealt. TempPoint is a point array variable.
 

Endless_Trev

New Member
Reaction score
5
DotA spell, deals damage based off how far the projectile of an attack has travelled. Though I guess it just takes the distance between the attacker and the attacked unit.
 

Ayanami

칼리
Reaction score
288
DotA spell, deals damage based off how far the projectile of an attack has travelled. Though I guess it just takes the distance between the attacker and the attacked unit.

Yeah, it's based on the distance between the damage source and damaged unit. If you cast Impetus and move further away from the target, it deals more damage.
 

hgkjfhfdsj

Active Member
Reaction score
55
still has the buff
- trigger fires on damage
- buff is removed on damaged
- only clashes if 2+ units with the same ability places the buff at the same time, which is highly unlikely
 

Stringel

New Member
Reaction score
12
isnt it much easier to start a trigger when the unit casts the spell, after that create a dummy that throws an invisible missile at the target dealing 0.01 damage, detect when that unit deals damage and thereafter deal damage based on distance from dummy to target. (move the dummy to the casting hero using periodic trigger).

just my thoughts
 

emobroken22

Member
Reaction score
3
isnt it much easier to start a trigger when the unit casts the spell, after that create a dummy that throws an invisible missile at the target dealing 0.01 damage, detect when that unit deals damage and thereafter deal damage based on distance from dummy to target. (move the dummy to the casting hero using periodic trigger).

just my thoughts

i think glenphir's method is much easier...sorry....but thanks for ur suggestion...
i always +rep anyone who replies in my post...so +rep to u too!!^^
 

Ayanami

칼리
Reaction score
288
isnt it much easier to start a trigger when the unit casts the spell, after that create a dummy that throws an invisible missile at the target dealing 0.01 damage, detect when that unit deals damage and thereafter deal damage based on distance from dummy to target. (move the dummy to the casting hero using periodic trigger).

just my thoughts

This won't work. Auto-cast isn't detected as spell.
 

DL.PIGGY

New Member
Reaction score
3
Code:
Mind Attack
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit))) Equal to True
        (Level of Telekinesis  for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Attacked unit) is in Mind_Group) Equal to False
            Then - Actions
                Unit Group - Add (Attacked unit) to Mind_Group
                Trigger - Add to Mind Damage <gen> the event (Unit - (Attacked unit) Takes damage)
            Else - Actions

Code:
Mind Spell
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Telekinesis 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Target unit of ability being cast) is in Mind_Group) Equal to False
            Then - Actions
                Unit Group - Add (Target unit of ability being cast) to Mind_Group
                Trigger - Add to Mind Damage <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
            Else - Actions

Code:
Mind Damage
    Events
    Conditions
        (Damage taken) Greater than 0.00
        (Damage taken) Less than 5000.00
        (Level of Telekinesis  for (Damage source)) Greater than 0
        ((Triggering unit) is in Mind_Group) Equal to True
        Or - Any (Conditions) are true
            Conditions
                ((Triggering unit) has buff Telekinesis (NS)) Equal to True
                ((Triggering unit) has buff Telekinesis (S)) Equal to True
    Actions
        Set Temp_Point = (Position of (Damage source))
        Set Temp_Point2 = (Position of (Triggering unit))
        Set Mind_Damage = ((0.03 + (0.03 x (Real((Level of Telekinesis  for (Damage source)))))) x (Distance between Temp_Point and Temp_Point2))
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Custom script:   call RemoveLocation(udg_Temp_Point2)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Mind_Damage Greater than 200.00
            Then - Actions
                Set Mind_Damage = 200.00
            Else - Actions
        Floating Text - Create floating text that reads (String((Integer(Mind_Damage)))) above (Triggering unit) with Z offset 0.00, using font size 9.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
        Floating Text - Hide (Last created floating text) for (All players matching (((Triggering unit) is visible to (Matching player)) Equal to False))
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 35.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
        Unit - Remove Telekinesis (NS) buff from (Triggering unit)
        Unit - Remove Telekinesis (S) buff from (Triggering unit)
        Unit - Cause (Damage source) to damage (Triggering unit), dealing Mind_Damage damage of attack type Magic and damage type Universal
 

emobroken22

Member
Reaction score
3
Code:
Mind Attack
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit))) Equal to True
        (Level of Telekinesis  for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Attacked unit) is in Mind_Group) Equal to False
            Then - Actions
                Unit Group - Add (Attacked unit) to Mind_Group
                Trigger - Add to Mind Damage <gen> the event (Unit - (Attacked unit) Takes damage)
            Else - Actions

Code:
Mind Spell
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Telekinesis 
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Target unit of ability being cast) is in Mind_Group) Equal to False
            Then - Actions
                Unit Group - Add (Target unit of ability being cast) to Mind_Group
                Trigger - Add to Mind Damage <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
            Else - Actions

Code:
Mind Damage
    Events
    Conditions
        (Damage taken) Greater than 0.00
        (Damage taken) Less than 5000.00
        (Level of Telekinesis  for (Damage source)) Greater than 0
        ((Triggering unit) is in Mind_Group) Equal to True
        Or - Any (Conditions) are true
            Conditions
                ((Triggering unit) has buff Telekinesis (NS)) Equal to True
                ((Triggering unit) has buff Telekinesis (S)) Equal to True
    Actions
        Set Temp_Point = (Position of (Damage source))
        Set Temp_Point2 = (Position of (Triggering unit))
        Set Mind_Damage = ((0.03 + (0.03 x (Real((Level of Telekinesis  for (Damage source)))))) x (Distance between Temp_Point and Temp_Point2))
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Custom script:   call RemoveLocation(udg_Temp_Point2)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Mind_Damage Greater than 200.00
            Then - Actions
                Set Mind_Damage = 200.00
            Else - Actions
        Floating Text - Create floating text that reads (String((Integer(Mind_Damage)))) above (Triggering unit) with Z offset 0.00, using font size 9.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
        Floating Text - Hide (Last created floating text) for (All players matching (((Triggering unit) is visible to (Matching player)) Equal to False))
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 35.00 towards 90.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
        Unit - Remove Telekinesis (NS) buff from (Triggering unit)
        Unit - Remove Telekinesis (S) buff from (Triggering unit)
        Unit - Cause (Damage source) to damage (Triggering unit), dealing Mind_Damage damage of attack type Magic and damage type Universal

i think i'll still go for glephir's method..much much much easier..xD
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top