• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Trigger'd Spell

Status
Not open for further replies.
Level 4
Joined
Dec 24, 2008
Messages
51
I tried to make a spell that reduces the enemy unit's hp to 50%.
I based it on channeling:

Data-Art Duration-1
Data-Base Order Id-Channel
Data-Disable Other Abilities-False
Data-Followed Throught Time-1
Data-Options-Viable,Psyhical Spell
Data-Target Type-Unit Target
Stats-Area Of Effect-1


^The channel part, tell me if anything is wrong, this is my frist attempt


And now my trigger:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to WTF
      • (Owner of (Triggering unit)) Not equal to Player 1 (Red)
    • Actions
      • Unit - Set life of (Targeted unit) to 50.00%

What is wrong?And thanks.
 
The only thing I can see wrong with it is that you aren't checking the enemies current health, meaning that it will get healed if it has less then 50% hp currently.

If that isn't the problem, it would help if you described what the problem was.
 
you should do it like this if you don´t wanna heal them


this action is dealing damage life - 50%

Unit - Set life of (Your unit) to ((Life of (Your unit)) / 2.00)

this action is dealing max life - 50%

Unit - Set life of (Your unit) to ((Percentage life of (Your unit) - 50)%

the only problem with second action is that the killing unit will not get gold when he kills a unit

but if you do it like this he will

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Percentage life of (target)) Greater than 50.00
    • Then - Actions
      • Unit - Set life of (target) to ((Percentage life of (target)) - 50.00)%
    • Else - Actions
      • Unit - Cause (cating) to damage (target), dealing 1000000000.00 damage of attack type Spells and damage type Normal
 
  • Untitled Trigger 001
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to WTF
  • (Owner of (Targeted unit)) Not equal to Player 1 (Red)
  • Actions
  • Unit - Set life of (Targeted unit) to 50.00%
Well, first of all why your trigger isnt working. You never establish a targeted unit. You said you based it on Channel right... Sooo. yea.

  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Picked unit)) is an enemy of (Owner of (Triggering unit))) Equal to True
            • Then - Actions
  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) / 2.00)
    • Else - Actions
And with this you never have to worry about the caster not getting credit for kills. The spell shouldnt kill anything. I think this is what you're asking for right? Like a version of D2 Sorceress's Static Field?
 
Last edited:
@Guishu
  • Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
HERE. It should be
  • Set Temp_Group = (Units within 512.00 of (Position of (Triggering unit))
then
  • Unit Group - Pick every unit in Temp_Group
and then
  • Custom Script - call DestroyGroup (udg_Temp_Group)
@needhelp1
Just do what Amigurumi said.
 
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to WTF
      • (Owner of (Triggering unit)) Not equal to Player 1 (Red)
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to 50.00%
Still doesnt work, I think the Channeling part of spell is wrong, can someone look for it?
 
Why you use condition ''(Owner of (Triggering unit)) Not equal to Player 1 (Red)''?
Just erase it and make the Channel can't target Ally.
You want this spell just target 1 unit or want to make it AoE spell?
If you want just target 1 unit, use this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Channel
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) / 2.00) damage of attack type Spells and damage type Normal
if you want AoE, use this
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to <Channel>
    • Actions
      • Set TempLoc[1] = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup =true
      • Unit Group - Pick every unit in (Units within 600.00 of TempLoc[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Life of (Picked Unit)) / 2.00) damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_TempLoc[1])
 
Status
Not open for further replies.
Back
Top