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

Flesh Heap - Ability

Status
Not open for further replies.
Level 5
Joined
Nov 29, 2007
Messages
106
I have maded skill that do :
When you kill hero u gain bonus strength (4levels of skill)
0.9/1.2/1.5/1.8 Strength per hero kill

Triggers:
Events:
Unit - An unit dies

Conditions:
Dying unit is hero = YES
Unity-type of Killing unit = MY HERO
Dying unit belongs to an enemy of owner of killing unit = YES

Actions:
Hero - Modify Strength of Killing unit ; ADD 1


Here's problem I mean i want to add 0.9, 1.2, 1.5, 1.8 per kill but in that trigger I can only set whole numbers like 1,2,3,4 etc. instead of number with "," or "." - Is it even possible to add there numbers afer comma?
 
Here it is, it worked :D
Btw I based spell on Devotion Aura!
(0.60 + (0.30 x (Real((Level of Devotion Aura for (Killing unit))))))
is formula for real number (level 1 - 0.9, level 2 - 1.2 and so on)

  • Spell
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Killing unit) Equal to Paladin 0000 <gen>
        • Then - Actions
          • Set Real_Spell[(Player number of (Owner of (Killing unit)))] = (Real_Spell[(Player number of (Owner of (Killing unit)))] + (0.60 + (0.30 x (Real((Level of Devotion Aura for (Killing unit)))))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Real_Spell[(Player number of (Owner of (Killing unit)))] Greater than or equal to 1.00
            • Then - Actions
              • Set Integer_Spell = (Integer(Real_Spell[(Player number of (Owner of (Killing unit)))]))
              • Set Real_Spell[(Player number of (Owner of (Killing unit)))] = (Real_Spell[(Player number of (Owner of (Killing unit)))] - (Real(Integer_Spell)))
              • Special Effect - Create a special effect attached to the overhead of (Killing unit) using Abilities\Spells\Undead\DeathPact\DeathPactTarget.mdl
              • Hero - Modify Strength of (Killing unit): Add Integer_Spell
              • Set Integer_Spell = 0
            • Else - Actions
        • Else - Actions
 

Attachments

  • Test Map.w3x
    10.2 KB · Views: 165
Status
Not open for further replies.
Top