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

Different attachments per level of ability?

Status
Not open for further replies.
Level 23
Joined
Apr 16, 2012
Messages
4,041
it is possible to do in 2 ways:

In object editor, if the spell has attachments, you can put it there, or you could trigger it as special effect, which you would create as model of the axe in his hand and store in variable, then when he levels the ability up, you destroy the previous effect(axe performs death animation and disappears) and then set the same variable(array preferred for MUIness) the new effect(with different axe)
 
it is possible to do in 2 ways:

In object editor, if the spell has attachments, you can put it there, or you could trigger it as special effect, which you would create as model of the axe in his hand and store in variable, then when he levels the ability up, you destroy the previous effect(axe performs death animation and disappears) and then set the same variable(array preferred for MUIness) the new effect(with different axe)

can you show me a sample trigger?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
What you need is to set up those attachments at map init - like in the trigger below.

  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Attachment[1] = Abilities\Spells\Other\AcidBomb\BottleImpact.mdl
      • Set Attachment[2] = Abilities\Spells\NightElf\Barkskin\BarkSkinTarget.mdl
      • Set Attachment[3] = Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
      • Set Attachment[4] = Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
Attachment is "string" variable array. Each string has different path to the effect - in my example [1] is AcidBomb buff, [2] Barkskin buff, [3] Bloodlust buff and [4] Disease Cloud buff.

Then second trigger fires when your hero learns the skill:
  • Weapon Mastery
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Weapon Mastery
    • Actions
      • Set integer = (Level of Weapon Mastery for (Triggering unit))
      • Special Effect - Destroy Weapon_effect
      • Special Effect - Create a special effect attached to the hand left of (Triggering unit) using Attachment[integer]
      • Set Weapon_effect = (Last created special effect)
When hero learns skill "Weapon Mastery", I delete his previous weapon (= special effect) and create a new one instead. As a path for the new special effect, I use the "Attachment" string array I created at map ini.

Note: Weapon_effect is "special effect" variable. This trigger will work for 1 hero only. If you want it to work for multiple heroes, you will need to make Weapon_effect into array and learn indexing and deindexing to make that MUI.

"integer" is Integer variable
 
What you need is to set up those attachments at map init - like in the trigger below.

  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Attachment[1] = Abilities\Spells\Other\AcidBomb\BottleImpact.mdl
      • Set Attachment[2] = Abilities\Spells\NightElf\Barkskin\BarkSkinTarget.mdl
      • Set Attachment[3] = Abilities\Spells\Orc\Bloodlust\BloodlustTarget.mdl
      • Set Attachment[4] = Units\Undead\PlagueCloud\PlagueCloudtarget.mdl
Attachment is "string" variable array. Each string has different path to the effect - in my example [1] is AcidBomb buff, [2] Barkskin buff, [3] Bloodlust buff and [4] Disease Cloud buff.

Then second trigger fires when your hero learns the skill:
  • Weapon Mastery
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Weapon Mastery
    • Actions
      • Set integer = (Level of Weapon Mastery for (Triggering unit))
      • Special Effect - Destroy Weapon_effect
      • Special Effect - Create a special effect attached to the hand left of (Triggering unit) using Attachment[integer]
      • Set Weapon_effect = (Last created special effect)
When hero learns skill "Weapon Mastery", I delete his previous weapon (= special effect) and create a new one instead. As a path for the new special effect, I use the "Attachment" string array I created at map ini.

Note: Weapon_effect is "special effect" variable. This trigger will work for 1 hero only. If you want it to work for multiple heroes, you will need to make Weapon_effect into array and learn indexing and deindexing to make that MUI.

"integer" is Integer variable

It works. Thank you :D
 
Status
Not open for further replies.
Top