Difference between revisions of "Template:Trigger"

From HIVE
Jump to navigation Jump to search
m
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<div class="gwn-trigger" style="width:100%;margin-bottom:1em;border:1px solid #313C57;background:#1A1F2C">
{| cellpadding="5" cellspacing="0" style="border: 1px solid darkgray; width: 100%; background: #2c2c2c"
+
<div class="gwn-trigger-header" style="padding:4px;border-bottom:1px solid #313C57;background:#1A1F2C;font-weight:bold;vertical-align:middle">''StarCraft 2'' Trigger <span style="float:right;font-size:.8em">[<nowiki/>[[Template:Trigger|template]]<nowiki/>]</span></div>
|<font size=3>'''{{{TriggerName}}}'''</font>
+
<div class="trigger-sc2-field trigger-sc2-events" style="float:left;clear:left;width:75px;padding:6px 4px 5px 4px;{{#if:{{{description|}}}|border-top:1px solid #888;|}}background:#1A1F2C;font-weight:bold;vertical-align:middle">Events:</div>
{| cellpadding="1" cellspacing="0" style="width: 98%; background: #2c2c2c" align="right"
+
<div class="trigger-sc2-value trigger-sc2-events" style="padding:1px 4px 5px 3px;margin-left:83px;{{#if:{{{description|}}}|border-top:1px solid #313C57;|}}background:#333">
|<span style="color:orange">'''Events'''</span>
+
{{{events|{{{1|None.}}}}}}
{| cellpadding="0" cellspacing="1" style="width: 98%; background: #2c2c2c" align="right"
+
</div>
|{{{TriggerEvents}}}
+
<div class="trigger-sc2-field trigger-sc2-variables" style="float:left;clear:left;width:75px;padding:6px 4px 5px 4px;border-top:1px solid #313C57;background:#1A1F2C;font-weight:bold;vertical-align:middle">Variables:</div>
|}
+
<div class="trigger-sc2-value trigger-sc2-variables" style="padding:1px 4px 5px 3px;margin-left:83px;border-top:1px solid #313C57;background:#333">
|}
+
{{{variables|{{{2|None.}}}}}}
{| cellpadding="1" cellspacing="0" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c" align="right"
+
</div>
|<span style="color:orange">'''Local Variables'''</span>
+
<div class="trigger-sc2-field trigger-sc2-conditions" style="float:left;clear:left;width:75px;padding:6px 4px 5px 4px;border-top:1px solid #313C57;background:#1A1F2C;font-weight:bold;vertical-align:middle">Conditions:</div>
{| cellpadding="0" cellspacing="1" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c" align="right"
+
<div class="trigger-sc2-value trigger-sc2-conditions" style="padding:1px 4px 5px 3px;margin-left:83px;border-top:1px solid #313C57;background:#333">
|{{{TriggerVariables}}}
+
{{{conditions|{{{3|None.}}}}}}
|}
+
</div>
|}
+
<div class="trigger-sc2-field trigger-sc2-actions" style="float:left;clear:left;width:75px;padding:6px 4px 5px 4px;border-top:1px solid #313C57;background:#1A1F2C;font-weight:bold;vertical-align:middle">Actions:</div>
{| cellpadding="1" cellspacing="0" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c;" align="right"
+
<div class="trigger-sc2-value trigger-sc2-actions" style="padding:1px 4px 5px 3px;border-top:1px solid #313C57;background:#333;overflow-y:auto">
|<span style="color:orange">'''Conditions'''</span>
+
{{{actions|{{{4|None.}}}}}}
{| cellpadding="0" cellspacing="1" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c" align="right"
+
</div>
|{{{TriggerConditions}}}
+
<div class="gwn-trigger-footer" style="padding:4px;border-top:1px solid #313C57;background:#1A1F2C;vertical-align:middle">[[Triggers|Learn about Triggers]]</div>
|}
+
</div>
|}
+
<noinclude>==Trigger Template Usage==
{| cellpadding="1" cellspacing="0" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c" align="right"
+
To use the Trigger template in an article, copy the following code:
|<span style="color:orange">'''Actions'''</span>
 
{| cellpadding="0" cellspacing="1" style="border: 0px solid darkgray; width: 98%; background: #2c2c2c" align="right"
 
|{{{TriggerActions}}}
 
|}
 
|}
 
|}
 
</includeonly>
 
<noinclude>
 
This is a work in progress by DevliN. To see this in action, check out [[Trigger Template Test]].
 
 
 
The following will place make the Trigger box show up in a Wiki article:
 
 
<pre>{{Trigger
 
<pre>{{Trigger
|TriggerName=
+
|events=
|TriggerEvents=
+
|variables=
|TriggerVariables=
+
|conditions=
|TriggerConditions=
+
|actions=
|TriggerActions=
+
}}</pre>
}}
 
</pre>
 
  
When using this, be sure to separate each line as you normally would on a Wiki page, otherwise it will look bunched up. At the moment, you will also have to erase all the spaces before the triggers if you are copying as text them from a map. The following is an example of how the "Melee Initialization" trigger would look:
+
If you don't use one of these factors in your Trigger, either write "None" next to it or remove that factor entirely. If you don't, the Trigger table will break on your page, and that would not be good.
<pre>{{Trigger
 
|TriggerName=Melee Initialization
 
|TriggerEvents=Game - Map initialization
 
|TriggerVariables=
 
|TriggerConditions=
 
|TriggerActions=Create melee starting units for all players
 
  
Create melee starting units for all players
+
If you have multiple lines to include in any of these sections, either sort them with a bullet (*) or double space the lines.
  
Start the melee AI for all computer players
+
===Tiered Actions===
 +
For actions and whatnot that span different tiers, use a colon (:) at the beginning of each line as you would normally do on a page if you wanted to indent. For example, you would use...
 +
<pre>General - If, then statement
 +
:If
 +
::First action
 +
::First action part 2
 +
:Then
 +
::Second action</pre>
 +
...to get an outcome like the following.
  
Set default melee options for all players
+
{| background
}}
+
General - If, then statement
</pre>
+
:If
 +
::First action
 +
::First action part 2
 +
:Then
 +
::Second action
 +
|}
 
</noinclude>
 
</noinclude>

Latest revision as of 00:28, 27 April 2011

StarCraft 2 Trigger [template]
Events:

None.

Variables:

None.

Conditions:

None.

Actions:

None.

Trigger Template Usage

To use the Trigger template in an article, copy the following code:

{{Trigger
|events=
|variables=
|conditions=
|actions=
}}

If you don't use one of these factors in your Trigger, either write "None" next to it or remove that factor entirely. If you don't, the Trigger table will break on your page, and that would not be good.

If you have multiple lines to include in any of these sections, either sort them with a bullet (*) or double space the lines.

Tiered Actions

For actions and whatnot that span different tiers, use a colon (:) at the beginning of each line as you would normally do on a page if you wanted to indent. For example, you would use...

General - If, then statement
:If
::First action
::First action part 2
:Then
::Second action

...to get an outcome like the following.

General - If, then statement
If
First action
First action part 2
Then
Second action