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

[Spell] Autocast Heal/Searing Arrow spell

Status
Not open for further replies.
Level 27
Joined
Jun 20, 2013
Messages
752
Hello, i'm working on this autocast spell is a dual searing arrow for enemies, heal for allies. The Dummy skill is Parasite.

Here is the problem, the skill is being used non-stop instead of finding a wounded unit to heal, or activating with attacks like searing arrows.

  • Healing Arrow
    • Acontecimientos
      • Unidad - A unit Comienza a lanzar una habilidad
    • Condiciones
      • (Ability being cast) Igual a Healing Arrow
    • Acciones
      • Set HArrow_Caster = (Triggering unit)
      • Set HArrow_Target = (Target unit of ability being cast)
      • -------- ----------------------------------------- --------
      • -------- Setting values for heal/damage --------
      • -------- ----------------------------------------- --------
      • Set HArrow_Damage = (1010.00 + ((Real((Level of Healing Arrow for HArrow_Target))) x 1.00))
      • Set HArrow_Heal = (1010.00 + ((Real((Level of Healing Arrow for HArrow_Target))) x 1.00))
      • -------- ----------------------------------------- --------
      • -------- Executing the Damage/Heal effect on the Target --------
      • -------- ----------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • (HArrow_Target belongs to an enemy of (Owner of HArrow_Caster)) Igual a True
        • Entonces: Acciones
          • Unidad - Cause HArrow_Caster to damage HArrow_Target, dealing HArrow_Damage damage of attack type Héroe and damage type Divino
        • Otros: Acciones
          • Unidad - Set life of HArrow_Target to ((Vida of HArrow_Target) + HArrow_Heal)
      • -------- ----------------------------------------- --------
      • -------- Removing unit leaks --------
      • -------- ----------------------------------------- --------
      • Custom script: set udg_HArrow_Caster = null
      • Custom script: set udg_HArrow_Target = null
 

Attachments

  • Spell Template.w3x
    106.9 KB · Views: 41
Level 10
Joined
Sep 16, 2016
Messages
269
I dont know Spanish, but if your spell works like Searing Arrow, then the trigger will mostly fail:
1) Allies with lower HP will die before getting healed.
2) Effect happens before the arrow being fired.

It should be easy with Damage Engine though
  • Arrow
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventTarget has buff HOLY ARROW ) Equal to True
        • Then - Actions
          • Unit - Remove HOLY ARROW buff from DamageEventTarget
          • Set Temp_Real = (DamageEventAmount + (10.00 x (Real((Level of Holy Arrows for DamageEventSource)))))
          • Special Effect - Create a special effect attached to the origin of DamageEventTarget using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
          • Special Effect - Destroy (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of DamageEventSource) is an enemy of (Owner of DamageEventTarget)) Equal to True
            • Then - Actions
              • Set DamageEventAmount = Temp_Real
              • Floating Text - Create floating text that reads (|CFFFF0000- + (String((Integer(DamageEventAmount))))) above DamageEventTarget with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
            • Else - Actions
              • Set DamageEventAmount = (-0.50 x Temp_Real)
              • Floating Text - Create floating text that reads (|CFF00FF00+ + (String((Integer((-1.00 - DamageEventAmount)))))) above DamageEventTarget 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 1.50 seconds
        • Else - Actions
https://www.hiveworkshop.com/attachments/holy-arrow-w3x.287076/
 
Level 27
Joined
Jun 20, 2013
Messages
752
Thanks for the spell, i've been testing and works well. In general the newer version don't act like heal with friendly units unless is ordered, and i've some problems when importing the spell, the jass part of the spell tends to crash, i don't known if is because i'm using the basic world editor.
 
Level 10
Joined
Sep 16, 2016
Messages
269
Searing Arrow is an autocast ability that requires ranged attack, so if you dont order unit to attack his allies, then it doesnt work. And I dont want unit's behavior that attacks friendly units on right-click. Damage Engine is GUI-friendly, and it requires some configuration. So you might want to look at the whole thing here: Damage Engine 3.7.0.1
 
Status
Not open for further replies.
Top