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

Trigger - Remove (SPECIFIC SPECIAL EFFECT) from unit's (SPECIFIC ATTACHMENT POINT)

Status
Not open for further replies.
Level 8
Joined
Sep 23, 2007
Messages
357
I need a trigger that will remove a specific special effect from a hero if a hero drops an item. I basically need this, translated into Warcraft 3 language

If:
Hero drops an item
Then:
If:
Item is equal to Shaman Mask
Then:
Remove Special Effect (Shaman Mask) from Hero's (head)


I need this trigger badly, help is appreciated
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
If you ADD the effect with triggers as well, then you don't need any triggers at all.

Just create an item ability (the best would be to base it off "Sphere", found in Human -> Units so the effects can stack).
Set "Art - Target" to the special effect.
Set "Art - Target Attachment Point 1" to the attachment point of your choice.
You can use multiple attachment points if you wish.

Now add that ability to the item "Shaman Mask".
When your hero picks up the item, he will get the special effect on him.
When he drops it, the effect will be removed.

Simple, no triggers required.


If you do want triggers, you'll have to use Special Effect variables.
 
Last edited:
Level 3
Joined
Feb 25, 2009
Messages
38
just in case you want it triggered:


first you need a Variable. Special Effect. name it whatever you want, i named it MaskOfDeath

(change the items, effects and names)

since i'm not sure what you already did, and the exact effect you wanted, i made the entire action.
i made it the standard Fireball Effect.

make two triggers. as followed:

  • Pickup
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mask of Death
    • Actions
      • Special Effect - Create a special effect attached to the head of (Triggering unit) using Abilities\Weapons\FireBallMissile\FireBallMissile.mdl
      • Set MaskOfDeath = (Last created special effect)

  • Drop
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mask of Death
    • Actions
      • Special Effect - Destroy MaskOfDeath
i'm not sure how "bullet-proof" this trigger is, but it works.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Use a hashtable to store specific effects at attachement points for certain units. As long as you only ever create atmost 1 on any specific attachment point the system will work fine (and you can test if an attachment point is used and handle it appropiatly).

Parent is the handle of the unit.
Child is a unique identifier for each attachmentpoint. Easiest would be a string hash.
 
Status
Not open for further replies.
Top