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

2 Trigger Spells

Status
Not open for further replies.
Level 13
Joined
Jul 26, 2008
Messages
1,009
Well I tried posting this in the Trigger/Jass section, but I only got 2 responses that were of little help. I suppose that's just not the best place to ask for help.

Well, here's my first trigger. It's got two skills that it takes into account. The skill itself is a Searing Arrow skill. There's another skill, a Dragon Breath skill with DoT damage based on Breath of Frost.

I want the Searing Arrow skill (Draconic Lance) to work like incinerate when the unit is under DoT damage (Dragon's Breath) in that the unit causes AoE damage if killed by Dragonic Lane. I have no idea how to do that though.

Then, if the skill is level 4 or above, and the unit is killed with less than 1% HP remaining, instead of normal AoE damage, it does Megaflare. I'm not sure if I have it set properly though.

So could someone assist me here on this skill. +Rep of course.

  • Draconic Lance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Draconic Lance (Troll Dragoon)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff Dragon's Breath ) Equal to True
        • Then - Actions
          • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - ((Real((Level of Draconic Lance (Troll Dragoon) for (Casting unit)))) x 10.00))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Real((Level of Draconic Lance (Troll Dragoon) for (Casting unit)))) Greater than or equal to 4.00
              • (Percentage life of (Target unit of ability being cast)) Less than or equal to 1.00
            • Then - Actions
              • Special Effect - Create a special effect at (Target point of ability being cast) using Megaflare.mdx
              • Unit - Cause (Target unit of ability being cast) to damage circular area after 0.50 seconds of radius (500.00 + ((Real((Level of Draconic Lance (Troll Dragoon) for (Casting unit)))) x 35.00)) at (Target point of ability being cast), dealing (((Real((Level of Draconic Lance (Troll Dragoon) for (Casting unit)))) x 200.00) + 150.00) damage of attack type Chaos and damage type Sonic
            • Else - Actions
        • Else - Actions
And then I have a second skill, Yoodu Voodoo. It's a healing spell that utelizes Big Bad Voodoo. Nearby units become invincible while it channels, However I'd like it to be more creative and replace the invincibility with say hitpoint absorption on hit, or something else like that. Big Bad Voodoo is the only channeling aura I know of though.

Also I want the Yoodu Voodoo to replenish hitpoints on the targets over time, but for the effect to end when the hero stops channeling. So far, this is all I've gotten on Yoodu Voodoo:

  • Yoodu Voodoo
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Yoodu Voodoo (Troll Witchdoctor)
    • Actions
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (20.00 x (Real((Level of Yoodu Voodoo (Troll Witchdoctor) for (Casting unit))))))%
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (20.00 x (Real((Level of Yoodu Voodoo (Troll Witchdoctor) for (Casting unit))))))%
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (20.00 x (Real((Level of Yoodu Voodoo (Troll Witchdoctor) for (Casting unit))))))%
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (20.00 x (Real((Level of Yoodu Voodoo (Troll Witchdoctor) for (Casting unit))))))%
      • Wait 1.00 seconds
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + (20.00 x (Real((Level of Yoodu Voodoo (Troll Witchdoctor) for (Casting unit))))))%
I am using Vexorian's Caster System in my map for other spells, and have been thinking of looking through that to figure out some good solutions, as JASS is more native to me than Triggers. Stilll, +rep for help.

Oh, and one more issue! I have a skill that uses a spellbook. However, all 5 skills in the book are based off of Lightning Orb (The one that casts purge). I'm quiet positive that they won't stack, though I think I changed that in gameplay constants? (You can do stuff like that for movespeed...) So what do you think? Will I have to turn those skills into trigger based skills?
 
Last edited:
Level 18
Joined
Aug 23, 2008
Messages
2,319
I think you got a problem with the 'dying unit' part in your first trigger. That dying unit could be any unit dying at that moment. I think you better change that to 'target of ability being cast' or connect the 'dying unit' to the 'target of ability being cast', so the trigger knows it's the same unit.
There is also no need to make a if/then/else in the Else part. You can just place the 2 actions directly under Else.

I don't know about the second trigger though. I'm not that advanced in triggers.
 
Level 12
Joined
Jun 28, 2008
Messages
688
For the first trigger, I assume you want the units to be incinerated only when they have the Dragon Breath buff on them, correct?

On your 2nd I/T/E statement, add to the If section the condition: Boolean - Unit - Target Unit of Ability Being Cast has (buff) Equal to True

And where it says (buff) just add the buff of the Dragon Breath ability, and that should about do it.
 
Level 13
Joined
Jul 26, 2008
Messages
1,009
Awesome, thanks Staber.

I couldn't get anything useful out of Avator's suggestions though because they would make the skill do something other than what I wanted it to do. But I have removed the dying unit, which I was previously aware of causing problems. And some of what you say is non-sensical.

I now just need to find a way to make the unit cause AoE damage on death to enemies in X range, but I don't know how. I have updated the trigger, and have replaced the first trigger I posted here with the new one.

As well, I'm not sure how to make Yoodu Voodoo do what I want it to.
 
Last edited:
Level 13
Joined
Jul 26, 2008
Messages
1,009
Erm... ... You didn't read any of my triggers or posts did you? Frustrating enough to make me want to yell at you.

But I'm sure you want to help, so I'll further clarify.

If you'll look at the trigger, you'll notice that I do have an AoE Damage effect. I just need to figure out how to make it only damage enemies. More importantly than that, I need to figure out how to make it only happen when the target of the spell dies.

The giving it the mine ability isn't a bad idea, but how would I do that properly? For one thing, how would I make it target the enemies of the caster, and how would I set it to be like incinerate, where if you don't hit the unit with the attack when it dies, it won't explode?

These are what are important to me.
 
Level 12
Joined
Jun 28, 2008
Messages
688
To make it only damage enemies, don't use Unit - Damage Area.

Make a Unit Group - Pick Every Unit in Range Matching Condition (Within X range of Triggering Unit) action.
Then for the condition, set it to Boolean - Player Comparison - Player is an enemy of Player - (Owner of (Picked Unit)) Is an enemy of (Owner of (Triggering Unit)) Equal to True

Then for the action, use Unit - Damage Target and deal the damage you want to the picked units.

As for the Voodoo spell, I'd like to help but I'd have to look into it first. You can expect a response within the next couple of days.

EDIT: Alrighty I had nothing better to do so I looked into it and here's what I came up with:
First off, you need 2 seperate triggers, one initialization trigger and one effect trigger. The effect trigger will not be initially on, of course, so uncheck that box.
You also need some variables:

YVCaster - Unit - Initial Value = (No Unit) <===This is your casting unit (obviously)
tempGroup - Unit Group - Initial Value = (None) <===This is the effected units of your ability.

For the first trigger, something along the lines of:

YVINIT <gen>
Events ] +Unit - Generic Unit Event - A unit starts the effect of an ability
Coditions] +Abilty Comparison - Event Response - Ability Being Cast Equal to (Yoodu Voodoo)
Actions ] +Generic - Set Variable - Set (YVCaster) = (Casting Unit)
+Unit Group - Pick every unit in range matching condition and do (actions) - Pick every unit within (X) of (YVCaster) matching (Same Ally Check Condition as I wrote for Megaflare) and do
-Generic - Set Variable - Set (tempGroup) = (Picked Unit)
-Unit - Make Vulnerable/Invulnerable - Make (Pick Unit) (Invulnerable)
+Trigger - Turn on (YVeffect <gen>)
+Wat - Wait (Your channeling time here)
+Trigger - Turn off (YVeffect <gen>)

YVeffect <gen>
Events ] +Time - Periodic Event - Every (1.00) seconds of game-time
Coditions]
Actions ] +If
+Boolean - Unit is Alive - (YVCaster) is Alive Equal to True
+Then
+Unit Group - Pick every unit in (tempGroup) and do
-Set life of (Picked Unit) to (Put your arithmetic here to get your value)
+Else
+Turn off (This Trigger)

There you have it, I think that should do the trick.
 
Last edited:
Status
Not open for further replies.
Top