• 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.
  • 💡 We're thrilled to announce that our upcoming texturing contest is in the works, and we're eager to hear your suggestions! Please take this opportunity to share your ideas in this theme discussion thread for the Texturing Contest #34!
  • 🏆 Hive's 7th HD Modeling Contest: Icecrown Creature is now open! The frozen wastes of Icecrown are home to some of Azeroth’s most terrifying and resilient creatures. For this contest, your challenge is to design and model a HD 3D monster that embodies the cold, undead, and sinister essence of Icecrown! 📅 Submissions close on April 13, 2025. Don't miss this opportunity to let your creativity shine! Enter now and show us your frozen masterpiece! 🔗 Click here to enter!

[Trigger] Having the life of the target 80%

Status
Not open for further replies.
Level 5
Joined
Mar 24, 2008
Messages
98
I tried to make this spell but the time i cast a spell on the unit that has 50% life goes to 80% let me show the trigger
Code:
Events
Unit starts the effect of an ability
Conditions
(Ability being cast) Equal to Demi
Actions
    Set c = (Casting unit)
    Set t = (Target unit of ability being cast)
    If ((Level of Demi  for c) Equal to 1) then do (Unit - Set life of t to 80.00%) else do (Do nothing)
    If ((Level of Demi  for c) Equal to 2) then do (Unit - Set life of t to 60.00%) else do (Do nothing)
    If ((Level of Demi  for c) Equal to 3) then do (Unit - Set life of t to 40.00%) else do (Do nothing)
Pls tell how to arrange the spell?
 
  • Demi
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Demi
    • Actions
      • Set TempUnitA = (Casting unit)
      • Set TempUnitB = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 1
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 20.00)%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 2
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 30.00)%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 3
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 40.00)%
        • Else - Actions
Next time, wrap your trigger in Trigger Tags:
Trigger.gif
, not Jass Tags.
 
Level 12
Joined
May 4, 2008
Messages
1,111
  • Demi
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Demi
    • Actions
      • Set TempUnitA = (Casting unit)
      • Set TempUnitB = (Target unit of ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 1
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 20.00)%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 2
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 30.00)%
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Demi for TempUnitA) Equal to 3
        • Then - Actions
          • Unit - Set life of TempUnitB to ((Percentage life of TempUnitB) - 40.00)%
        • Else - Actions
Next time, wrap your trigger in Trigger Tags:
Trigger.gif
, not Jass Tags.


EDIT: ahhh gawd i jsust posted it too late XD u posted it be4 meh
 
Status
Not open for further replies.
Top