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. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. 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 easily post triggers

Discussion in '"Graveyard"' started by MortAr, Apr 7, 2010.

  1. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,768
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7

    How to easily post triggers

    Table of Contents





    [point]Step 1[/point]
    Step 1
    - choosing the right trigger -

    I'm guessing most of you have already learned how to trigger in GUI, but, anyway. Finding the right trigger will mean - simply open your map, and then open the "Trigger Editor" or simply press (F4), and navigate to the folder where the trigger is and select it. After finding the right trigger that needs to be copied, you can proceed to the next step.​




    [point]Step 2[/point]
    Step 2
    - copying the needed trigger -
    After finding and selecting the right trigger, you must copy it in order to post it. To do this, follow these little steps - When you've selected the trigger, in the panel where all the Events/Condition/Actions are displayed, there's a little white icon with the name of the trigger. Click there to select it, then RIGHT click the mouse and a menu will pop-up. From this menu, simply select "Copy as Text" and don't touch anything else, for now.​




    [point]Step 3[/point]
    Step 3
    - Pasting the trigger onto the forums -
    After you are done with step 2, you can proceed with this one. Here is the main deal of how to actually post your trigger on the forum. This can be done very easily by following these simple steps - Open up the forum, and after that, go to the RIGHT section of the forums (usually that will be "World Editor Help Forum" or the "Triggers & Scripts" forum). When you finally have found the place where you want to post your trigger, make a new thread or post and click the button "Go Advanced". After that, you will see an empty field for your text - here you'll paste your trigger (Note: keep in mind that your trigger is currently copied to the clipboard, which means, if you copy any other text, you'll lose the trigger text. If that happens, go back to step 2 before proceeding). Now the main part of this tutorial - finally posting the trigger. There's two ways of posting the trigger into the forum field. The first method is by pressing this [​IMG] little icon which will automatically wrap the [trigger][/trigger] tags into the field for the text. After the tags are parsed, click between them and press "CTRL+V" or RIGHT click with the mouse and click "PASTE". After that, a huge text will appear into the text-box .. this is your trigger's actions , events, and conditions. When this is done, you can freely post the thread or the post and show your trigger to the other peoples.​




    [point]Step 4[/point]
    Step 4
    - Additional features when using the trigger tags -
    Maybe you've noticed that the browser window will not shrink with the trigger-tags, that means you definitely have to make some changes. Most of people might yell at you and tell you to use the [hidden][/hidden] tags, which are mostly the greatest thing ever made for situations like this. The "hidden" will simply hide the huge area of text of your trigger-tags so the page won't get filled with text and make it look ugly. Here is an example how this is going to look like:

    This text is hidden

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


    You now can see that this text is hidden, thus is doesn't shrink the browser's window nor filling the post with text.


    Note: In order to use the [hidden][/hidden] tags you need to enter an valid title for the hidden-box.
    To do that, simply write this: [hidden="Write your title here"][/hidden]. This would look exactly like this:

    Write your title here
    OHAI

    Additional bbcodes and such can be found here.​




    [point]Step 5[/point]
    Step 5
    - posting JASS scripts -
    Hey! Lets not forget the scripts here... With them, its even easier to post in forums. Simply, find the trigger/script you want to post, select all the text inside, and then press "CTRL+C" or "RIGHT" click with the mouse and click "COPY". Now you can proceed to the forums (follow step 3 if needed) and use the [jass][/jass] tags, placing the text between them with "CTRL+V" or "RIGHT" click with the mouse and click "PASTE". An example of a JASS function can be viewed here:

    Code (vJASS):
    function Test takes nothing returns nothing
        call TriggerSleepAction ( 1.00 )
    endfunction
     


    Now please notice that, here we don't need to use the "hidden" tags in order to hide the text for better readability, because the tags has a hiding function by itself.

    If you want to just show someone an simple function or a single row of the code, you can use the [ljass][/ljass] tags.
    Example of the tags can be viewed here:

    function Test takes nothing returns nothing

    call TriggerSleepAction ( 1.00 )


    The [ljass] tags allow you to post things of a simple line or word without having to return to the next line. For example:
    return
    won't skip to the next line.


     
    Last edited by a moderator: May 2, 2010
  2. Darkness-4ever

    Darkness-4ever

    Joined:
    Nov 4, 2007
    Messages:
    763
    Resources:
    0
    Resources:
    0
    I was unaware there were people in need of a tutorial of this magnitude to correctly post triggers in the forums, all it took me was a couple of trial & errors to get the hang of it.
     
  3. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,768
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    I did this tutorial not only for the people that do not know how to post triggers at all.. It's for everyone that do not know to properly post triggers.. because I've seen a lot of threads with peoples asking for help without stating where is the problem or is it a trigger or a JASS scripts.

    So, the tutorial is for everyone that need a little bit help when they need to post trigger(s) or JASS script(s).
     
  4. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
  5. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,768
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
    Thanks for fixing grammar, I was actually planning to do it someday since I knew I had some mistakes done.

    And, hey thanks for the approval.
     
  6. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Moving to GY in favor of Rheiko's tutorial, since it is updated for hive 2 and has some screenshots to boot.
     
  7. Masky

    Masky

    Joined:
    Mar 16, 2013
    Messages:
    63
    Resources:
    0
    Resources:
    0
    usseful for me <3 thanks
     
  8. 3ICE

    3ICE

    Joined:
    Jul 4, 2007
    Messages:
    78
    Resources:
    0
    Resources:
    0
    Link How To Post Your Trigger (Took me a while to find, even with advanced Google-Fu.)