I only ever code with text Trigedit; my triggers are usually saved as a plaintext file somewhere, and they have comments in the format of the archetypal double-slash prefixed lines.
An example of a trigger text file for map utilizing this system would be:
Collapsable Box

//-----------------------------------------------------------------//
// CORSAIR RUSH: MRUA<Null>RD100622CATundefSnMnBNDISTy
//
// INDEX (Append '#' prefix to designation to search)
// Respawning triggers: RSP1
// RSP2
// Counter system: CNTR
// Leaderboard display: INIT
// Victory Trigger: VCT1
// Hyper Triggers: HYPERBEGIN
// HYPEREND
// Forced Ally: ALLY1
// ALLY2
//
// TAGS: >NP<
// >PG<
// >KG<
// >DEFUNCT<
// >CONST<
//
//-----------------------------------------------------------------//
//Force 1 Respawning Trigger: #RSP1
//Recreates corsair while player still suffers deaths of corsairs
Trigger("Corsair Rush"){
Conditions:
//Fires if and only if there are one or more deaths of corsairs
Deaths("Current Player", "Protoss Corsair", At least, 1);
//Respawns Corsair when dead
Actions:
//Spawn at flag
Move Location("Current Player", "Flag", "Everywhere", "2x2");
Create Unit("Current Player", "Protoss Corsair", 1, "2x2");
//Auto attack
Order("Current Player", "Protoss Corsair", "2x2", "rs", attack);
//Remove deaths and add to counter
Set Deaths("Current Player", "Protoss Corsair", Subtract, 1);
Set Deaths("Current Player", "Terran Firebat", Add, 1);
Preserve Trigger();
}
//-----------------------------------------------------------------//
//Force 2 Respawning Trigger: #RSP2
Trigger("Made by: Null"){
Conditions:
Deaths("Current Player", "Protoss Corsair", At least, 1);
Actions:
Move Location("Current Player", "Flag", "Everywhere", "2x2");
Create Unit("Current Player", "Protoss Corsair", 1, "2x2");
Order("Current Player", "Protoss Corsair", "ls", "rs", attack);
Set Deaths("Current Player", "Protoss Corsair", Subtract, 1);
Set Deaths("Current Player", "Terran Firebat", Add, 1);
Preserve Trigger();
}
//-----------------------------------------------------------------//
//Counter to extra corsairs: #CNTR
//Makes players gain more corsairs every 6 deaths
Trigger("All players"){
Conditions:
//One counter added every corsair death; fires when counter reaches 6 or above
Deaths("Current Player", "Terran Firebat", At least, 6);
Actions:
//Add 1 to corsair deaths and subtract 6 counters
Set Deaths("Current Player", "Protoss Corsair", Add, 1);
Set Deaths("Current Player", "Terran Firebat", Subtract, 6);
Preserve Trigger();
}
//-----------------------------------------------------------------//
//Display Leaderboard: #INIT >NP<
//Leaderboard shows number of kills attained by individual players.
Trigger("All players"){
Conditions:
//Always condition fires on map start
Always();
Actions:
//Displays leaderboard for all players, not preserved
Leader Board Kills("<--Best Killer", "Protoss Corsair");
}
//-----------------------------------------------------------------//
//Victory Trigger: #VCT1 >NP< >PG<
//Ends scenario in victory for players who attain 5000 kills
Trigger("All players"){
Conditions:
//Fires if current player attains 5000 corsair kills
Kill("Current Player", "Protoss Corsair", At least, 5000);
Actions:
//Wait 2 seconds before declaring victory
Wait(2000);
//Declare victory. Scenario ends
Victory();
//BUG: Allied victory does not work. Change trigger to fire for each team?
}
//-----------------------------------------------------------------//
//Victory Trigger: #VCT2 >NP< >KG< >DEFUNCT<
//Ends scenario in victory if enemies leave/do not exist
//
//Trigger("All players"){
//Conditions:
//
//Fires if current player attains 5000 corsair kills
// Command("Non Allied Victory Players", "Protoss Corsair", At most, 0);
//
//Actions:
//
//Wait 2 seconds before declaring victory
// Wait(2000);
//
//Declare victory. Scenario ends
// Victory();
//
//BUG: Will prematurely end scenario if all enemies are simultaneously dead. Removed.
// Consider replacing with "Command x Flags".
//}
//-----------------------------------------------------------------//
//Hyper Triggers: #HYPERBEGIN
//Trigger cycle will run at a rate of 250/21 times per second with this implementation. 4 nests deep.
Trigger("All players"){
Conditions:
Always();
Actions:
Preserve Trigger();
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Always();
Actions:
Preserve Trigger();
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Always();
Actions:
Preserve Trigger();
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
}
//-----------------------------------------------------------------//
Trigger("All players"){
Conditions:
Always();
Actions:
Preserve Trigger();
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
Wait(0);
}
//#HYPEREND
//-----------------------------------------------------------------//
//Forced Ally Trigger for Force 1: #ALLY1 >CONST<
//Disable alliance changing against teammates
Trigger("Corsair Rush"){
Conditions:
//Constantly fires.
Always();
Actions:
//Set Force 1 to Allied Victory
Set Alliance Status("Corsair Rush", Allied Victory);
Preserve Trigger();
}
//-----------------------------------------------------------------//
//Forced Ally Trigger for Force 2: #ALLY2 >CONST<
//Disable alliance changing against teammates
Trigger("Made by: Null"){
Conditions:
//Constantly fires.
Always();
Actions:
//Set Force 1 to Allied Victory
Set Alliance Status("Made by: Null", Allied Victory);
Preserve Trigger();
}
//-----------------------------------------------------------------//
#EOF
PROS:
-Much, much faster to debug, code, and mass duplicate triggers or use regular expressions to replace stuff
-Ability to flag your triggers and use Ctrl-F to jump to specific ones
-Use regular expressions to mass replace units/trigger elements
-Tag triggers of certain categories and ability to jump to them
-Ability to disable triggers without using a Never(); condition (Tinymap2 safe)
-Comments do not take up trigger action space (I can now have 64 actions max instead of 63 if I used the traditional comment system)
-More than one comment per trigger; could explain what each and every single line does
-Comments are not embedded into map*
-No strings are wasted
-Coding can be done exclusively with keyboard, speeding up the process substantially
*Could be a con, if you are hoping to understand your triggers.
CONS:
-Lazy people can't be bothered to do this
-Potentially obfuscates code for other mappers**
-Requires saving another file
**Probably a pro if you do not want people stealing it?
(Recommend using Notepad++ or TextPad)