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

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,198
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