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. The 15th Mini-Mapping Contest came to an end. The Secrets of Warcraft 3 are soon to be revealed! Come and vote in the public poll for your favorite maps.
    Dismiss Notice
  3. The 12th incarnation of the Music Contest is LIVE! The theme is Synthwave. Knight Rider needs a song to listen to on his journey. You should definitely have some fun with this theme!
    Dismiss Notice
  4. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  5. 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.

How To Post Your Trigger

Discussion in 'Miscellaneous Tutorials' started by Rheiko, Jul 13, 2016.

  1. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    How To Post Your Triggers

    I've seen many and many members around the site who need help with their triggers but don't know how to post their triggers in a thread, especially the newcomers. Posting your triggers in a thread is very important when you're asking a help from other members to fix or find a problem in your triggers. This tutorial is intended to help you to post your triggers easily in a thread.


    Table of Contents



    1. Find Your Trigger [point]Step 1[/point]
      First of all, you must find the trigger you want to post. This is a very basic thing to do and I am sure you don't have any problem with this step but just in case you do, I will tell you how to do it. Open your map with the World Editor. Find the "Module" button and click it then choose "Trigger Editor". You can also open it with the shortcut key "F4" which is more faster than the previous method.
      [​IMG]

      The Trigger Editor window will appear, browse through the folders for your triggers. Then Left-Click on the trigger you wanted to post.

      [​IMG]

    2. Copy Your Trigger [point]Step 2[/point]
      Once you've Left-Clicked on the trigger you wanted to post, you will see that The Trigger Editor consists of 3 Boxes. First is the list of folders and triggers you have. Second is the comment of the trigger you have. Third is the "Trigger Functions". Inside the Trigger Functions, you can see the title of your trigger. Right-Click on it. A menu will pop up and you will find "Copy As Text" in there. Left-Click on it.
      [​IMG]
    3. Paste Your Trigger [point]Step 3[/point]
      In the Hiveworkshop, you can post your triggers in a thread by using the [trigger][/trigger] tags. You can't find these tags in the menu so you have to write them yourself. But before you do that, make sure you Left-Click on the button at the Top-Right Corner of the menu. The Button is "Use BB Code Editor". The purpose is to make sure that the triggers are inlined correctly in the thread.
      [​IMG]

      Write the trigger tags then paste your copied trigger between them like this: [trigger]Paste your copied Trigger here![/trigger]
      [​IMG]
      [​IMG]
      Here's my result:
      • Melee Initialization
        • Events
          • Map initialization
        • Conditions
        • Actions
          • Melee Game - Use melee time of day (for all players)
          • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
          • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
          • Melee Game - Set starting resources (for all players)
          • Melee Game - Remove creeps and critters from used start locations (for all players)
          • Melee Game - Create starting units (for all players)
          • Melee Game - Run melee AI scripts (for computer players)
          • Melee Game - Enforce victory/defeat conditions (for all players)

    4. The Hidden Tags [point]Step 4[/point]
      You may probably have noticed that the browser window gets stretched (Sometimes, it doesn't. It depends on how long the triggers are). This is unpleasant to some people so you definitely need to do something about this. This is where the Hidden Tags get some action. Hidden Tags allow you to hide a huge wall of text in your postings. This is very useful for triggers because they usually have a huge wall of text. Now, simply write [hidden=The Title][/hidden]. As usual, the text that you wanted to hide must be between the tags. Here's the example of it:
      Hidden Triggers
      • Melee Initialization
        • Events
          • Map initialization
        • Conditions
        • Actions
          • Melee Game - Use melee time of day (for all players)
          • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
          • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
          • Melee Game - Set starting resources (for all players)
          • Melee Game - Remove creeps and critters from used start locations (for all players)
          • Melee Game - Create starting units (for all players)
          • Melee Game - Run melee AI scripts (for computer players)
          • Melee Game - Enforce victory/defeat conditions (for all players)

    5. How To Post JASS Scripts [point]Step 5[/point]
      Posting JASS Scripts is even more easier than posting Triggers. Simply find the Scripts you wanted to post, select all the text inside and copy them. Go to the forum, make sure you have Left-Clicked on the "Use BB Code Editor" button as I've explained in the 3rd Step. Then paste the scripts between the [jass][/jass] tags. Example:
      Code (vJASS):
      function Trig_Melee_Initialization_Actions takes nothing returns nothing
          call MeleeStartingVisibility(  )
          call MeleeStartingHeroLimit(  )
          call MeleeGrantHeroItems(  )
          call MeleeStartingResources(  )
          call MeleeClearExcessUnits(  )
          call MeleeStartingUnits(  )
          call MeleeStartingAI(  )
          call MeleeInitVictoryDefeat(  )
      endfunction

      //===========================================================================
      function InitTrig_Melee_Initialization takes nothing returns nothing
          set gg_trg_Melee_Initialization = CreateTrigger(  )
          call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
      endfunction

       

      If you want to show someone a simple function or a single row of code, you can use the [ljass][/ljass] tags instead. Example:
      call KillUnit(udg_YourVar)

      call RemoveLocation(udg_YourVar)

    That is all about How To Post Your Triggers. I hope this tutorial can be helpful for you.
    Any feedbacks and suggestions are highly appreciated.

    Sincerely, Rheiko ~
     
  2. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,491
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    An updated "How to Post Triggers" was definitely needed, but I'm not really digging the color choice here. The small text size between the large photos also made me miss some text describing the images :p

    When Hive was updated, Ralle made it so that triggers have a maximum height like jass tags. They won't stretch the entire page like they used to xP With that in mind, I only advise using [hidden=""][/hidden] when you are posting inside a table.
     
  3. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Definitely!

    Now that you mention it. Well, I don't think that's a big problem but I probably can make the text size slightly bigger. :p

    Hmm, I wasn't sure Ralle has already made that change by the time I made this tutorial and I didn't actually bother to confirm it so I just wrote it anyway. :p
    Thanks for your feedback!
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,427
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Looks good! Thanks for making this! :)

    Approved.
     
  5. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,109
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Definilty good one to have updated!

    Though I did never understand the extra step to find the trigger editor and the right trigger. It seems like saying
    " look at site 10 now"
    vs "
    " you need to have your book open that you are currently reading and then look at site 10 "
     
  6. Rheiko

    Rheiko

    Joined:
    Aug 27, 2013
    Messages:
    2,936
    Resources:
    7
    Icons:
    2
    Spells:
    3
    Tutorials:
    2
    Resources:
    7
    Perhaps It needs to be explained more thoroughly, because it sounds unclear and people can find it difficult to understand what it means. :xxd: