• 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.

Storm bolt (for more info read the thread!)

Status
Not open for further replies.
Level 11
Joined
Aug 23, 2010
Messages
665
I want to make the storm bolt ability to heals the casting unit equal to how much the storm bolt deal damage to the targeted unit, but i dont know whats the trigger because im still noob at it, can someone help me make the trigger? I will give +rep if someone make it for me . Yeah thats all, sorry if i post this on the wrong section. And please dont make it jass.
 
Level 4
Joined
Aug 5, 2011
Messages
99
  • spell
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Unit - Cause (Triggering unit) to damage (Triggering unit), dealing (-1.00 x (100.00 + (125.00 x (Real((Level of Storm Bolt for (Triggering unit))))))) damage of attack type Spells and damage type Normal
is this what u want maybe?
 
assuming that the damage of the bolt is 100,150,200,250,300...
the xxx is the raw code of your storm bolt ability
views at object editor, press CTRL+D and replace the xxx below...
  • Events
    • Unit - A unit starts the effect on ability
  • Condition
    • (Ability being cast) Equal to Storm Bolt)
  • Actions
    • Custom script: local unit u = GetTriggerUnit()
    • Custom script: local integer level = GetUnitAbilityLevel(u, 'xxx')
    • Custom script: local real heal = 50 + level * 50.
    • Custom script: call SetWidgetLife(u, GetWidgetLife(u)+heal)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
@mckill2009: What's raw code?
Raw Code is the Code's Spell/Order ID which you can obtain it from the Object Editor (CTRL + D) to change from natural language, to Order ID language

This is useful in JASS/Custom script-based trigger as it requires you to enter the raw code in the function instead its name of the ability

In mckill's trigger, 'xxx' refers to YOUR Spell ID which is ? (CTRL + D in object editor~)

If let's say it's A000, you input in that function as 'A000' (don't foget the ' ' as it is a-MUST)
 
Status
Not open for further replies.
Top