• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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