1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

please help me

Discussion in 'World Editor Help Zone' started by venus0310, Jun 23, 2010.

  1. venus0310

    venus0310

    Joined:
    Apr 24, 2010
    Messages:
    17
    Resources:
    0
    Resources:
    0
    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:
     
  2. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,801
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Please ask more clearly.
     
  3. Berb

    Berb

    Joined:
    Jan 21, 2006
    Messages:
    2,539
    Resources:
    2
    JASS:
    2
    Resources:
    2
    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.
     
  4. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    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.
     
  5. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,801
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    There is no need for an attachment system considering you can set attachments in the object editor for items.