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

Ability help

Status
Not open for further replies.
Level 3
Joined
Jun 27, 2008
Messages
34
I'm tring to make an ability that at unit attacks the other ang gains mana equal to thier attack. can any one help?
 
Level 11
Joined
Feb 11, 2010
Messages
199
I'm tring to make an ability that at unit attacks the other ang gains mana equal to thier attack. can any one help?

Use an attack/damage detection system, and set unit mana = unit mana + Event Response - damage dealt on each attack.

Something like...
  • Attack Init
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Attack Detect Orb for (Attacking unit)) Greater than 0
    • Actions
      • Set Target = (Attacked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Target is in TargetGroup) Equal to False
        • Then - Actions
          • Unit Group - Add Target toTargetGroup
          • Trigger - Add to Detect Attack <gen> the event (Unit - Target Takes damage)
        • Else - Actions
  • Detect Attack
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Attack Detect (Non-stacking)) Equal to True
          • (Level of Slow Poison for (Damage source)) Greater than 0
        • Then - Actions
          • Unit - Remove Attack Detect (Non-stacking) buff from (Triggering unit)
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (Damage taken))
        • Else - Actions
Enjoy :thumbs_up:
 
Last edited:
Level 3
Joined
Jun 27, 2008
Messages
34
Use an attack/damage detection system, and set unit mana = unit mana + Event Response - damage dealt on each attack.

Something like...
  • Attack Init
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Attack Detect Orb for (Attacking unit)) Greater than 0
    • Actions
      • Set Target = (Attacked unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Target is in TargetGroup) Equal to False
        • Then - Actions
          • Unit Group - Add Target toTargetGroup
          • Trigger - Add to Tenderizer Damage <gen> the event (Unit - Target Takes damage)
        • Else - Actions
  • Detect Attack
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has buff Attack Detect (Non-stacking)) Equal to True
          • (Level of Slow Poison for (Damage source)) Greater than 0
        • Then - Actions
          • Unit - Remove Attack Detect (Non-stacking) buff from (Triggering unit)
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (Damage taken))
        • Else - Actions
Enjoy :thumbs_up:

how do u make attack detection system and what is Tenderizer Damage <gen>
 
Level 3
Joined
Jun 27, 2008
Messages
34
ok i got most of it now. just 2 more questions:

Q1: how did u get Attack Detect (Non-stacking) buff

Q2: how did u get the + (Damage taken)) in

  • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (Damage taken))
thanks for your time :cool:
 
Level 3
Joined
Jun 27, 2008
Messages
34
how do u add +(Damage taken)) to

  • Unit - Set mana of (Triggering unit) to (Mana of (Triggering unit))
i csnt figure it out and it agrivating me
 
Status
Not open for further replies.
Top