• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

please help me

Status
Not open for further replies.
Level 2
Joined
Apr 24, 2010
Messages
18
please help me make a trigger when a hero who brought items such as armor, swords, hats, shoes ... immediately appear on the items that the hero:pal:
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
You should read the sticky at the very top of the Triggers & Scripts section that Rui just posted. If you don't know what the hell you're doing and you are unable to start a trigger, then post it in the World Editor Help section.
 
I believe he is speaking of an attachment system. It's simple.
  • Tri
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • ----- Items' setup; Variable type: Item-type-----
    • Set Items[1] = Boots of Speed
    • Set Items[2] = Hat
    • Set Items[3] = Gloves of Agility
    • ----- Attachment paths; Variable type: String -----
    • Set ItemAttachments[1] = war3mapImported\Boots.mdx
    • Set ItemAttachments[2] = war3mapImported\WizardsHat.mdx
    • Set ItemAttachments[3] = war3mapImported\GlovesHaste.mdx
    • ----- Attachment points; Variable type: String -----
    • Set Points[1] = foot, left + foot, right
    • Set Points[2] = head
    • Set Points[3] = hand, left + hand, right
The "+"'s in "Points[]" variable are made with "Substring" function.
  • Trigger
  • Events
    • Unit - A unit acquires an item
  • Conditions
  • Actions
    • For each (IntegerA) from 1 to 3, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Item-type of (Item being manipulated)) Equal to Items[(IntegerA)]
          • Then - Actions
            • Special Effect - Create a special effect on Points[(IntegerA)] of (Triggering unit), using ItemAttachments[(IntegerA)]
          • Else - Actions
Use the same with Unit - A unit loses an item event and Destroy the effects. Save the effects using arrays or hashtables.
 
Status
Not open for further replies.
Top