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

Cast a ability

Status
Not open for further replies.
Level 4
Joined
Aug 28, 2015
Messages
75
Hello, I need help ... I wonder how it can be done for a unit to be created with an effect (not the spell) as anti-magic shield or divine shield, which granted a passive as magic resistance, increased damage or defense, that permanent... Thanks :goblin_good_job:
 
Hello, I need help ... I wonder how it can be done for a unit to be created with an effect (not the spell) as anti-magic shield or divine shield, which granted a passive as magic resistance, increased damage or defense, that permanent... Thanks :goblin_good_job:

Example triggers + an attached test map:

This will add the effect of "Divine Shield" to all Footmen + it will increase their armor by 1.

  • Effect Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set Effect_Hashtable = (Last created hashtable)
  • Effect Start Units
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Effect_Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Effect_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Footman
            • Then - Actions
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
              • Hashtable - Save Handle Of(Last created special effect) as 1 of (Key (Picked unit)) in Effect_Hashtable
              • Unit - Add Item Armor Bonus (+1) to (Picked unit)
            • Else - Actions
              • Unit Group - Remove (Picked unit) from Effect_Group
  • Effect New Units
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit Group - Add (Triggering unit) to Effect_Group
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
      • Hashtable - Save Handle Of(Last created special effect) as 1 of (Key (Triggering unit)) in Effect_Hashtable
      • Unit - Add Item Armor Bonus (+1) to (Triggering unit)
  • Effect Remove
    • Events
      • Unit - A unit Dies
      • Unit - A unit leaves (Playable map area)
    • Conditions
      • ((Triggering unit) is in Effect_Group) Equal to True
    • Actions
      • Special Effect - Destroy (Load 1 of (Key (Triggering unit)) in Effect_Hashtable)
      • Hashtable - Clear all child hashtables of child (Key (Triggering unit)) in Effect_Hashtable
      • Unit - Remove Item Armor Bonus (+1) from (Triggering unit)
      • Unit Group - Remove (Triggering unit) from Effect_Group
Or, you can always edit the passive ability to give the effect of your choice and add the ability to the desired unit with the object editor like in the 2nd attached map.
 

Attachments

Last edited:
Emm ... always it has to be an ability of an object? Because I want more than anything, that is a passive skill with a particular effect, for example, create a unit called "Gnoll Wizard" and, being a magician, I wanted to add the effect of Divine Shield, but that gives resistance to the magic 60%, and the effect is visible without being a skill, serious, that the effect of magic resistance appears as "this unit has increased its magic resistance," but that does not appear between the skills ...
 
Emm ... always it has to be an ability of an object? Because I want more than anything, that is a passive skill with a particular effect, for example, create a unit called "Gnoll Wizard" and, being a magician, I wanted to add the effect of Divine Shield, but that gives resistance to the magic 60%, and the effect is visible without being a skill, serious, that the effect of magic resistance appears as "this unit has increased its magic resistance," but that does not appear between the skills ...

You mean that you want the unit to have a buff but not the spell?

P.S. I'm having trouble understanding you. I'm sorry, but your English isn't very good.
 
This is an example, it adds the buff "Magic Shield" with the effect of "Divine Shield" to all Footmen and also they will take 60% less spell damage. I hope that it is what you want.
 

Attachments

Status
Not open for further replies.
Back
Top