• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spells damage in base of their atribute

Status
Not open for further replies.
Level 8
Joined
Apr 14, 2011
Messages
466
Hi everyone i have to ask something.
How can i make a custom spell that damage his opponents in base of his streng , agility or inteligence?
 
Level 2
Joined
Jun 1, 2014
Messages
18
  • SpellDmg
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (2.00 x (Real((Strength of (Triggering unit) (Include bonuses))))) damage of attack type Hero and damage type Normal
Use Convert Integer to Real, then Hero Attribute to call up hero stats
 
Level 8
Joined
Apr 14, 2011
Messages
466
Thank you all :)
And ...i have a problem with importing spells it's the same way that import models?
 
Go to File -> Preferences -> Tick "Automatically create unknown variables while pasting trigger data", go to the spell on the other map, right click and copy it, go into your map, right click and paste it.

For (v)Jass it's a bit different, you need to convert a new trigger into text (have the trigger selected and go to Edit (in the Trigger Editor) -> Convert to custom text. Copy the whole text code from the source (map or resource) and paste it in the code block of your map that you have just converted).
 
Downloaded as in you downloaded a map which contains the spell right?
In that case you do what Pharaoh_ said, and then you copy the triggers from the test map you downloaded, into your own map.

You might need to change (in the trigger you copied) which spell triggers the trigger.

Assuming the spell map is coded in GUI of course.
 
Level 8
Joined
Apr 14, 2011
Messages
466
Thank you all!Because i saw a spell in a campaign that was something like the rogue of wow
You gain combo points using an ability and that combo points are used in the other ability
I wanted to understand how the creator make it and i didn't know how to start to create some of my own.

EDIT:And how do a passive ability that increases some of the stats?
 
Last edited:
Status
Not open for further replies.
Top