Rheiko
Spell Reviewer
- Joined
- Aug 27, 2013
- Messages
- 4,249
I've seen many members across the site—especially newcomers—who need help with their triggers but don't know how to properly post them in a thread. Posting your triggers clearly is very important when you're asking others for help in fixing or identifying issues. This tutorial is intended to guide you on how to easily share your triggers in a thread.
Table of Contents
- Find Your Trigger
First of all, you need to locate the trigger you want to post. This is a basic step, and you probably already know how to do it—but just in case, here’s a quick guide. Open your map in the World Editor, click on the "Module" menu, and select "Trigger Editor". Alternatively, you can press F4 as a shortcut—it’s quicker and more convenient.
The Trigger Editor window will open. Browse through the folders to locate the trigger you want to share, then left-click on it to select it. - Copy Your Trigger
Once you've left-clicked on the trigger you want to post, you'll notice that the Trigger Editor is divided into three main sections:
- The left panel – This shows the list of folders and triggers in your map.
- The upper-right panel – This displays the trigger's comment or description.
- The lower-right panel (Trigger Functions) – This is where the actual trigger actions are shown.
In the Trigger Functions panel, right-click on the trigger title (the top line of the actions). A menu will appear—select "Copy As Text" by left-clicking on it. This will copy the whole trigger of "Melee Initialization" in one go. Similarly, you can also right-click on any individual section of the trigger if you wish to copy only that portion as text (e.g. events, conditions, actions). If you wish to copy only one line of the trigger then simply right-click on that single line. For this tutorial, we will copy the whole trigger like so:
- Paste Your Trigger
On Hiveworkshop, you can post your triggers in a thread using the [trigger][/trigger] tags. You can type these tags manually, or simply left-click the trigger button to automatically insert them. This ensures that your triggers are properly formatted and easy for others to read and understand.
Use whichever method you prefer to add the [trigger][/trigger] tags, then paste your copied trigger between them, like this:
[trigger]Paste your copied Trigger here![/trigger]
Here's my final result when I make a post:-
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)
-
-
-
- The Hidden Tags
You may probably have noticed that the browser window gets stretched sometimes (It depends on how long the triggers are and where you post them). This can be unpleasant for some people to look at, 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:-
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)
-
-
-
- How To Post JASS Scripts
Posting JASS Scripts is even easier than posting Triggers. Simply find the Scripts you want to post, select all the text inside and copy them. Go to the forum, find JASS button and left-click on it. You can find the button right beside the trigger button. Then paste the scripts between the [code=jass][/code] tags. Example:
JASS: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 nothinghttps://www.hiveworkshop.com/search/ set gg_trg_Melee_Initialization = CreateTrigger( ) call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions ) endfunction
call KillUnit(udg_YourVar)
call RemoveLocation(udg_YourVar)
That is all about How To Post Your Triggers. I hope this tutorial can help you out.
Enjoy exploring the site!
Any feedbacks and suggestions are greatly appreciated.
Sincerely, Rheiko ~
Enjoy exploring the site!
Any feedbacks and suggestions are greatly appreciated.
Sincerely, Rheiko ~
Last edited: