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.
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.
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 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.
- 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 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:
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:
function Test takesnothingreturnsnothing callTriggerSleepAction(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 takesnothingreturnsnothing callTriggerSleepAction(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:
won't skip to the next line.
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).