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

How to make a spell deal damage based on attribute?

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to YourTargetUnitAbility
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (Real((Strength of (Triggering unit) (Include bonuses)))) damage of attack type Spells and damage type Normal
Which part do you stuck on ?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Conversion - Convert Integer To Real > Hero - Hero Attribute

The function is in Integer, default Damage dealt is in Real, that's why you must convert it first to get to Integer, and then there will be that Hero - Hero Attribute function.

I've created a test map for you.
 

Attachments

  • test5.w3x
    12.6 KB · Views: 357
Status
Not open for further replies.
Top