• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] Need help on auto-cast ability

Status
Not open for further replies.
Level 4
Joined
May 27, 2012
Messages
60
What I want is this autocast ability to pop an elemental effect on basic attack, I have black arrow on autocast but I don't know what I'm doing wrong or how to fix it. At the moment I'm using immolation instead because I have no clue how to use autocast in triggers

What I am trying to do: On auto attack hit, causes either a fire,ice, or lightning explosion, dealing damage based on the attackers INT multiplied and such. I also want to add effects such as burning, freezing (slow), paralysis. I just need to know how to clean up the trigger or how to create a new one that functions with auto cast abilities :)

  • Elemental Mastery DMG
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Elemental Mastery ) Equal to True
    • Actions
      • Set RandomElement = (Random integer number between 1 and 3)
      • Set EM_Point = (Position of (Attacked unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RandomElement Equal to 1
        • Then - Actions
          • Special Effect - Create a special effect attached to the origin of (Attacked unit) using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius 300.00 at EM_Point, dealing ((Real((Intelligence of (Attacking unit) (Include bonuses)))) + 1.00) damage of attack type Hero and damage type Cold
          • Custom script: call RemoveLocation(udg_EM_Point)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RandomElement Equal to 2
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Attacked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius 300.00 at EM_Point, dealing ((Real((Intelligence of (Attacking unit) (Include bonuses)))) + 1.00) damage of attack type Hero and damage type Cold
              • Custom script: call RemoveLocation(udg_EM_Point)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RandomElement Equal to 3
                • Then - Actions
                  • Special Effect - Create a special effect attached to the origin of (Attacked unit) using Doodads\Cinematic\FirePillarMedium\FirePillarMedium.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Cause (Attacking unit) to damage circular area after 0.00 seconds of radius 300.00 at EM_Point, dealing ((Real((Intelligence of (Attacking unit) (Include bonuses)))) + 1.00) damage of attack type Hero and damage type Cold
                  • Custom script: call RemoveLocation(udg_EM_Point)
                • Else - Actions
Thanks in advanced to anyone who can teach :)
 
Last edited:
If I gave bash no stun but a 100% chance, and no bonus damage, can I activate the trigger through the bash? Then I could just reduce the mana through triggering instead maybe.

So you just basically want it so that everytime a unit attacks, something happens to the attacked unit and the attacker loses mana?
 

Ardenian

A

Ardenian

Don't use auto-cast effects, they do not work appropriate, sadly, I had a similar problem like this, too.

My solution would be, you create a dummy unit having all abilities that can be triggered by chance.

Don't limit yourself to how the abilities look in the object data.

For burning, for example, create a Rejuvenation with negative healing amount, so it damages the unit and create a custom buff, so it looks as if the unit is burning, modifying the special effect of the Rejuvenation ability so it looks like burning.
Frost Nova ( or Slow if you want a more configurable one) for Frost Arrows and Stormhammer of the Dwarfen Knight hero for Paralysis.
 
Level 4
Joined
May 27, 2012
Messages
60
Don't use auto-cast effects, they do not work appropriate, sadly, I had a similar problem like this, too.

My solution would be, you create a dummy unit having all abilities that can be triggered by chance.

Don't limit yourself to how the abilities look in the object data.

For burning, for example, create a Rejuvenation with negative healing amount, so it damages the unit and create a custom buff, so it looks as if the unit is burning, modifying the special effect of the Rejuvenation ability so it looks like burning.
Frost Nova ( or Slow if you want a more configurable one) for Frost Arrows and Stormhammer of the Dwarfen Knight hero for Paralysis.

I had no idea Rejuv could go into negative values. I was looking at Shadow Strike and wondering, how am I going to make this burning... haha :vw_wtf:
I still don't know how to make leak-less dummy casts I'm pretty new to Triggers. Like I know that you need to create a dummy at the loc(variable), but I'm not sure how to give it the proper ability and make it cast it on a group of targets for example, and not hit me.
 
I had no idea Rejuv could go into negative values. I was looking at Shadow Strike and wondering, how am I going to make this burning... haha :vw_wtf:
I still don't know how to make leak-less dummy casts I'm pretty new to Triggers. Like I know that you need to create a dummy at the loc(variable), but I'm not sure how to give it the proper ability and make it cast it on a group of targets for example, and not hit me.

You can add the ability to them by using the Unit - Add Ability function in the triggers. To cast it on a group of people, you can use the Unit Group - Pick Every Unit In Unit Group function and filter them out using If/Then/Else. Wietlol shows a perfect example on this post.
 
Status
Not open for further replies.
Top