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

Spell Problem

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
(Trigger at bottom of post)
Ok i havn ability based of searing arrows, it does no damage. I have the trigger below thats suppose to takeaway 5/8/11%mana from the target and convert it to health for the caster. Each attack has a 10/15/20% chance for this to happen, but my trigger does seem to work, any suggestions?

  • Dark Conversion
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(flamingarrows))
    • Actions
      • Set Dice = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Conversion for (Ordered unit)) Equal to 1
          • Dice Less than or equal to 10
        • Then - Actions
          • Unit - Set life of (Ordered unit) to ((Life of (Ordered unit)) + ((Mana of (Target unit of issued order)) x 0.05))
          • Set L = (Position of (Target unit of issued order))
          • Special Effect - Create a special effect at L using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Set L = (Position of (Ordered unit))
          • Special Effect - Create a special effect at L using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Unit - Set mana of (Target unit of issued order) to ((Mana of (Target unit of issued order)) - ((Mana of (Target unit of issued order)) x 0.05))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Conversion for (Ordered unit)) Equal to 2
          • Dice Less than or equal to 20
        • Then - Actions
          • Unit - Set life of (Ordered unit) to ((Life of (Ordered unit)) + ((Mana of (Target unit of issued order)) x 0.08))
          • Set L = (Position of (Target unit of issued order))
          • Special Effect - Create a special effect at L using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Set L = (Position of (Ordered unit))
          • Special Effect - Create a special effect at L using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Unit - Set mana of (Target unit of issued order) to ((Mana of (Target unit of issued order)) - ((Mana of (Target unit of issued order)) x 0.08))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Conversion for (Ordered unit)) Equal to 3
          • Dice Less than or equal to 20
        • Then - Actions
          • Unit - Set life of (Ordered unit) to ((Life of (Ordered unit)) + ((Mana of (Target unit of issued order)) x 0.11))
          • Set L = (Position of (Target unit of issued order))
          • Special Effect - Create a special effect at L using Abilities\Spells\NightElf\ManaBurn\ManaBurnTarget.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Set L = (Position of (Ordered unit))
          • Special Effect - Create a special effect at L using Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
          • Custom script: call RemoveLocation(udg_L)
          • Unit - Set mana of (Target unit of issued order) to ((Mana of (Target unit of issued order)) - ((Mana of (Target unit of issued order)) x 0.11))
          • Game - Display to (All players) the text: (String(((Mana of (Target unit of ability being cast)) x 0.11)))
        • Else - Actions
 
Level 10
Joined
Jan 21, 2007
Messages
576
You can detect when turning on autcast spells, cant you detect when it casts (auto)?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Only some like heal of the priest and bloodlust trigger the unit casts spell event when used.

Spells like flaming arrow DO NOT trigger any event when used on auto cast but the unit is attacked event (before it is fired) and the unit takes damage event (when it hits the target). You have to use a complex jass system to make your own event system for it. Hopefully in SC2 they will not let such a problem occure especially since they say that a lot more spells will be auto cast.

Also, please post in the right section. This is a spells & systems post so rui please send it over.
 
Level 10
Joined
Jan 21, 2007
Messages
576
Were not suppose to post spell problems here...? Doesnt everyone...?
 
Level 10
Joined
Jan 21, 2007
Messages
576
WEHZ -Need help with the world editor? Ask questions about triggers, spells, scripts etc.

I realize there are slightly more specific forums but there are usualy less responses in those forums, and it is not wrong to post about spells in this forum. Having a moderator does not change descriptions, btw congrats Rui!....wherever you are currently :p.
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
This thread has been moved from the World Editor Help Zone to the Spells and Systems Forum. A redirection link has been left in the original forum to provide a conection between the original place and the new location of this thread. This redirection link will expire in 24 hours.
 
Level 10
Joined
Jan 21, 2007
Messages
576
Kk, im not one to intententionaly piss people off (but dont think im a kissass). Alright so what threads would fit into the WEHZ rules?
 
Status
Not open for further replies.
Top