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

[Trigger] ~ Removing Undead Restriction from Lich Heroes 'Dark Ritual' ~

Status
Not open for further replies.
Level 3
Joined
May 8, 2008
Messages
38
I have this so far.

  • Dark Ritual Dummy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Casting unit) Not equal to (Revivable Hero)
        • Then - Actions
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.25 x (Life of (Target unit of ability being cast))))
          • Unit - Kill (Target unit of ability being cast)
        • Else - Actions
          • Do nothing
What else do I need to do? My dummy ability has 3 levels - and I want the first level to convert all the units health into 25% mana, as you can see by the (0.25 x (Life of (Target unit of ability being cast)))) string. I want the second level to do 0.50, and the third level to convert the health to mana at a 1.00 ratio. How can I do this?
 
Level 2
Joined
Mar 7, 2005
Messages
23
its easy .. just add a condition ( integer - level of ability for triggering unit )

  • Dark ritual Dummy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Not equal to (Revivable Hero)
        • Then - Actions
          • If ((Level of Chain Lightning for (Triggering unit)) Equal to 1) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.25 + (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • If ((Level of Chain Lightning for (Triggering unit)) Equal to 2) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.50 + (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • If ((Level of Chain Lightning for (Triggering unit)) Equal to 3) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (1.00 + (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • Unit - Kill (Target unit of ability being cast)
        • Else - Actions
 
Level 3
Joined
May 8, 2008
Messages
38
Woops, it actually didn't work. I have this.
it doesnt give me the mana



  • Dark Ritual Dummy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dark Ritual
      • (Target unit of ability being cast) Not equal to (Revivable Hero)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Ritual for (Casting unit)) Equal to 1
        • Then - Actions
          • Unit - Kill (Target unit of ability being cast)
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.25 x (Life of (Target unit of ability being cast))))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Ritual for (Casting unit)) Equal to 2
        • Then - Actions
          • Unit - Kill (Target unit of ability being cast)
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.50 x (Life of (Target unit of ability being cast))))
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dark Ritual for (Casting unit)) Equal to 3
        • Then - Actions
          • Unit - Kill (Target unit of ability being cast)
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (1.00 x (Life of (Target unit of ability being cast))))
        • Else - Actions
          • Do nothing
 
Last edited:
Level 2
Joined
Mar 7, 2005
Messages
23
hm.. i think its becuase u r killing target of ability being cast.. just 1 line before than when u want transfare its life to ur unit mana.. so ..

  • Dark ritual Dummy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dark Ritual
      • (Target unit of ability being cast) Not equal to (Revivable Hero)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
          • If ((Level of Dark Ritual for (Triggering unit)) Equal to 1) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.25 x (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • If ((Level of Dark Ritual for (Triggering unit)) Equal to 2) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (0.50 x (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • If ((Level of Dark Ritual for (Triggering unit)) Equal to 3) then do (Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + (1.00 x (Life of (Target unit of ability being cast))))) else do (Do nothing)
          • Wait 0.10 seconds
          • Unit - Kill (Target unit of ability being cast)
        • Else - Actions
try this plz.. i think it works

i dont know what exactly do u want :p but i think if u play with dark ritual data in object editor u can have better result without using triggers..
 
Level 2
Joined
Mar 25, 2009
Messages
13
This should work.

  • Dark Ritual
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Dark Ritual
      • (Target unit of ability being cast) Not equal to (Revivable Hero)
    • Actions
      • If ((Level of Dark Ritual for (Casting unit)) Equal to 3) then do (Set YourVariable = 1) else do (Set YourVariable = ((Real((Level of Dark Ritual for (Casting unit)))) x 0.25))
      • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + (YourVariable x (Life of (Target unit of ability being cast))))
      • Unit - Kill (Target unit of ability being cast)
 
Last edited:
Level 3
Joined
May 8, 2008
Messages
38
How are you getting this string in the actions section?

  • If ((Level of Dark Ritual for (Casting unit)) Equal to 3) then do (Set YourVariable = 1) else do (Set YourVariable = ((Real((Level of Dark Ritual for (Casting unit)))) x 0.25))
 
Level 2
Joined
Mar 25, 2009
Messages
13
Sorry for not replying faster, I've been really busy lately. The action if/then/else is under general actions. You can then add sub-actions to it when you edit the function.
 
Status
Not open for further replies.
Top