• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Use Health instead of mana on searing arrows

Status
Not open for further replies.
Level 4
Joined
Aug 8, 2011
Messages
84
Ability beings its effect

Ability being cast = searing arrows

if (Casting Unit Life > (whatever you want) ) then
Set Casting Unit Life = Casting Unit Life - (whatever you want)
else
Order (Casting Unit) to stop
Order (Casting Unit) to attack (Target Unit of Ability Being Cast)
endif

That is obviously pseudo-code. But you understand the point.
 
Level 12
Joined
Oct 10, 2009
Messages
439
I never really had any luck on getting autocasting abillities to work with Triggers, However you can use a simple buff check with an "On/off" abillity placeholder.

Basically, you need to create three abillities, A placeholder for the "On", One for the "Off" And an orb effect (Could be based off the Lightning attack lightning lizards have.)

Now then, Give the unit the placeholder abillity (Basically a dummy abillity, does nothing if clicked) And trigger it, So that when that certain abillity is used, it is removed, and then replaced by the Placeholder "On" Abillity, Meanwhile also adding the orb effect to the unit via a trigger.

Simple, when the "On" abillity is cast, replace it with the "Off" abillity and remove the Orb effect.
 
I never really had any luck on getting autocasting abillities to work with Triggers, However you can use a simple buff check with an "On/off" abillity placeholder.

Basically, you need to create three abillities, A placeholder for the "On", One for the "Off" And an orb effect (Could be based off the Lightning attack lightning lizards have.)

Now then, Give the unit the placeholder abillity (Basically a dummy abillity, does nothing if clicked) And trigger it, So that when that certain abillity is used, it is removed, and then replaced by the Placeholder "On" Abillity, Meanwhile also adding the orb effect to the unit via a trigger.

Simple, when the "On" abillity is cast, replace it with the "Off" abillity and remove the Orb effect.

That's a lot of work, he can use triggers instead of swapping abilities.

• Use a trigger (Trigger 1) that checks when a unit casts the ability (to remove health from manual targetings)
  • Tr
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to X
•The second trigger will check when the autocast is on:

  • trigg
  • Events
    • Unit - A unit is issued an order with no target
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Issued order) Equal to (Order(flamingarrows))
      • Then - Actions
        • Unit Group - Add (Triggering unit) to FlamingArrowsOn
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Issued order) Equal to (Order(unflamingarrows))
          • Then - Actions
            • Unit Group - Remove (Triggering unit) from FlamingArrowsOn
          • Else - Actions
• The third trigger includes a Damage Detection System (Check Bribe's or Weep's) that will remove the health when a unit takes damage (GDD_DamagedUnit). Then a condition will check if the damage source (GDD_DamageSource) is in FlamingArrowsOn unit group. If it is, Set life of GDD_DamageSource to (Life of GDD_DamageSource - (Level of ability + 3)).
 
Status
Not open for further replies.
Top