Difference between revisions of "Triggers Guide"

From Last Legacy Wiki
Jump to: navigation, search
(Special global variables)
(Functions)
Line 201: Line 201:
  
 
== Functions ==
 
== Functions ==
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
http://i.imgur.com/xzTXmzs.png
<img src="http://i.imgur.com/xzTXmzs.png" alt="Image">Press this "<span style="font-style: italic">Add New Function</span>" button to add a function, and you will be presented with a drop-down menu that looks sort of like the one below. Click on a button to see what type of functions are listed in that category.<a href="#aaa1"><img src="http://i.imgur.com/NEQh99r.png" alt="Image"></a><a href="#aaa2"><img src="http://i.imgur.com/ow8C8ua.png" alt="Image"></a><a href="#aaa3"><img src="http://i.imgur.com/b74lQiL.png" alt="Image"></a><a href="#aaa4"><img src="http://i.imgur.com/j3aABKG.png" alt="Image"></a><a href="#aaa5"><img src="http://i.imgur.com/sZi5sZx.png" alt="Image"></a><a href="#aaa6"><img src="http://i.imgur.com/zZobJt4.png" alt="Image"></a><a href="#aaa7"><img src="http://i.imgur.com/gCqpoxa.png" alt="Image"></a><a href="#aaa8"><img src="http://i.imgur.com/upG81JW.png" alt="Image"></a><a href="#aaa9"><img src="http://i.imgur.com/Wn3UXZ6.png" alt="Image"></a><span style="font-size: 150%; line-height: 116%;">Function List:</span>
+
 
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
Press this '''Add New Function''' button to add a function. You will be presented with a drop-down menu that looks sort of like the one below. Click on a button to see what type of functions are listed in that category.
<hr>
+
 
<a name="aaa1"></a><img src="http://i.imgur.com/NEQh99r.png" alt="Image"><span style="display: none;">Flow Control</span>"Flow Control" functions are for altering how the code runs and the order in which the compiler reads it.<img src="http://i.imgur.com/MUbDxjZ.png" alt="Image"><span style="display: none;">Branch If...</span>The compiler will skip to the line you specify when this command is run if a specified variable meets certain conditions.<span style="font-style: italic">If statement is true, will jump and continue executing code from input line. Otherwise ignores this function.</span>
+
http://i.imgur.com/NEQh99r.png
 +
 
 +
http://i.imgur.com/ow8C8ua.png
 +
 
 +
http://i.imgur.com/b74lQiL.png
 +
 
 +
http://i.imgur.com/j3aABKG.png
 +
 
 +
http://i.imgur.com/sZi5sZx.png
 +
 
 +
http://i.imgur.com/zZobJt4.png
 +
 
 +
http://i.imgur.com/gCqpoxa.png
 +
 
 +
http://i.imgur.com/upG81JW.png
 +
 
 +
http://i.imgur.com/Wn3UXZ6.png
 +
 
 +
=== Function List ===
 +
 
 +
<a name="aaa1"></a>http://i.imgur.com/NEQh99r.png <span style="display: none;">Flow Control</span>"Flow Control" functions are for altering how the code runs and the order in which the compiler reads it.http://i.imgur.com/MUbDxjZ.png <span style="display: none;">Branch If...</span>The compiler will skip to the line you specify when this command is run if a specified variable meets certain conditions.<span style="font-style: italic">If statement is true, will jump and continue executing code from input line. Otherwise ignores this function.</span>
 
<table class="table table-bordered table-hover" border="1">
 
<table class="table table-bordered table-hover" border="1">
 
   <thead>
 
   <thead>
Line 239: Line 259:
 
   </thead>
 
   </thead>
 
</table>
 
</table>
<img src="http://i.imgur.com/B2RB8lr.png" alt="Image"><span style="display: none;">Go to</span>The compiler will skip to the line you specify when this command is run.<span style="font-style: italic">Jump and continue executing code from input line.</span><img src="http://i.imgur.com/F2vdmaV.png" alt="Image"><span style="display: none;">Sleep</span>This will stop the compiler at the current line for a duration of the specified number of frames, then it will continue.- Changing the game setting so 60 frames per second will NOT change how sleep works.<span style="font-style: italic">Will pause (sleep) this thread for X amount of frames (30 frames = 1 second)</span>
+
http://i.imgur.com/B2RB8lr.png <span style="display: none;">Go to</span>The compiler will skip to the line you specify when this command is run.<span style="font-style: italic">Jump and continue executing code from input line.</span>http://i.imgur.com/F2vdmaV.png <span style="display: none;">Sleep</span>This will stop the compiler at the current line for a duration of the specified number of frames, then it will continue.- Changing the game setting so 60 frames per second will NOT change how sleep works.<span style="font-style: italic">Will pause (sleep) this thread for X amount of frames (30 frames = 1 second)</span>
 
<table class="table table-bordered table-hover" border="1">
 
<table class="table table-bordered table-hover" border="1">
 
   <thead>
 
   <thead>
Line 292: Line 312:
 
   </thead>
 
   </thead>
 
</table>
 
</table>
<img src="http://i.imgur.com/VvQ76rm.png" alt="Image"><span style="display: none;">Exit</span>Stops the trigger.<span style="font-style: italic">Will stop this thread immediately.</span><img src="http://i.imgur.com/vU9o7Ht.png" alt="Image"><span style="display: none;">Sleep until not touched</span>Pauses the compiler at this line until the player is no longer touching the item from which the line is run.- onHit triggers only.<span style="text-decoration: underline"><span style="font-weight: bold">Invisible Hitboxes:</span></span><span style="font-style: italic">Will pause (sleep) this thread until player is no longer touching this.</span><span style="text-decoration: underline"><span style="font-weight: bold">Platforms:</span></span>
+
http://i.imgur.com/VvQ76rm.png <span style="display: none;">Exit</span>Stops the trigger.<span style="font-style: italic">Will stop this thread immediately.</span>http://i.imgur.com/vU9o7Ht.png <span style="display: none;">Sleep until not touched</span>Pauses the compiler at this line until the player is no longer touching the item from which the line is run.- onHit triggers only.<span style="text-decoration: underline"><span style="font-weight: bold">Invisible Hitboxes:</span></span><span style="font-style: italic">Will pause (sleep) this thread until player is no longer touching this.</span><span style="text-decoration: underline"><span style="font-weight: bold">Platforms:</span></span>
 
<table class="table table-bordered table-hover" border="1">
 
<table class="table table-bordered table-hover" border="1">
 
   <thead>
 
   <thead>
Line 309: Line 329:
 
   </thead>
 
   </thead>
 
</table>
 
</table>
<span style="font-style: italic">Will pause (sleep) this thread until:timeOut#-of-frames pass <span style="font-weight: bold">OR:</span> offDuration#-of-frames pass after player jumps off platform.</span><a href="http://i.imgur.com/pnn756S.png" target="_blank"><img src="http://i.imgur.com/pnn756S.png" width="306" height="35" border="0"></a><span style="display: none;">Sleep until on ground</span>This will stop the compiler at the current line until the player touches the ground.<span style="font-style: italic">Will sleep thread until the player is touching the ground.</span>
+
<span style="font-style: italic">Will pause (sleep) this thread until:timeOut#-of-frames pass <span style="font-weight: bold">OR:</span> offDuration#-of-frames pass after player jumps off platform.</span><a href="http://i.imgur.com/pnn756S.png" target="_blank">http://i.imgur.com/pnn756S.png" width="306" height="35" border="0"></a><span style="display: none;">Sleep until on ground</span>This will stop the compiler at the current line until the player touches the ground.<span style="font-style: italic">Will sleep thread until the player is touching the ground.</span>
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
<a name="aaa2"></a>http://i.imgur.com/ow8C8ua.png <a name="aaa2"></a><span style="display: none;">Math</span>In the "Math" section, you can manipulate variables using calculations.http://i.imgur.com/flP00z3.png <span style="display: none;">Set</span>Will set a variable to a specified number or variable.<span style="font-style: italic">Sets a given var to an integer or value of another var.</span>http://i.imgur.com/3S31zOV.png <span style="display: none;">Add</span>Will set a variable to the sum of two numbers or variables.<span style="font-style: italic">Sets given var to sum of 2 ints/vars (a = b + c).</span>http://i.imgur.com/GI9K95D.png <span style="display: none;">Subtract</span>Will set a variable to the difference of two numbers or variables.<span style="font-style: italic">Sets given var to difference of 2 ints/vars (a = b - c).</span>
<a name="aaa2"></a><img src="http://i.imgur.com/ow8C8ua.png" alt="Image"><a name="aaa2"></a><span style="display: none;">Math</span>In the "Math" section, you can manipulate variables using calculations.<img src="http://i.imgur.com/flP00z3.png" alt="Image"><span style="display: none;">Set</span>Will set a variable to a specified number or variable.<span style="font-style: italic">Sets a given var to an integer or value of another var.</span><img src="http://i.imgur.com/3S31zOV.png" alt="Image"><span style="display: none;">Add</span>Will set a variable to the sum of two numbers or variables.<span style="font-style: italic">Sets given var to sum of 2 ints/vars (a = b + c).</span><img src="http://i.imgur.com/GI9K95D.png" alt="Image"><span style="display: none;">Subtract</span>Will set a variable to the difference of two numbers or variables.<span style="font-style: italic">Sets given var to difference of 2 ints/vars (a = b - c).</span>
+
 
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
<a name="aaa3"></a>http://i.imgur.com/b74lQiL.png <span style="display: none;">Game</span>In the "Game" section, you can find various functions which alter gameplay.http://i.imgur.com/9rO0tp1.png <span style="display: none;">Gravity</span>Changes the orientation of the player's gravity to the specified angle.- Gravity strength is not implemented as of the current version.- Only affects the player.<span style="font-style: italic">Will set universal gravity to new variables input in this function.</span>http://i.imgur.com/e5bm6Q6.png <span style="display: none;">Time control</span>Slows down game events and animations to a specified percentage.- <span style="font-weight: bold">WARNING: ONCE SET, IT WILL STAY SET WHEN EXITING THE LEVEL UNTIL IT IS SET BACK TO 100.</span>- Does not affect "Sleep" function.<span style="font-style: italic">Changes the speed of time to the percentage given</span>http://i.imgur.com/f7qviqm.png <span style="display: none;">Begin Cinema</span>Activates <span style="font-style: italic">Cinema Mode</span>, in which the player is frozen, but everything else moves normally.- Useful for cutscenes.<span style="font-style: italic">Will change the gameplay to cinema mode. Character is paused/cannot be controlled/hurt, time flow is not </span>a<span style="font-style: italic">ffected.</span>http://i.imgur.com/PxnPWj0.png <span style="display: none;">End Cinema</span>Stops <span style="font-style: italic">Cinema Mode</span> and game returns to normal.<span style="font-style: italic">Will turn off cinema mode</span>http://i.imgur.com/LC3mKx1.png <span style="display: none;">Move Camera</span>Moves the camera to specified absolute or relative coordinates.- Relative coordinates do not work currently.If "use tag"" is checked, <span style="font-style: italic">Instead of using x and y coordinates, will lock onto given item (and will follow if the item moves)</span>. x and y will specify the <span style="font-style: italic">relative offset from item</span>You can also set Absolute Zoom (50% = zoomed out) (50% - 400%) or Relative Zoom (-50% = zoomed out) (-50% - 300%)."Speed:" <span style="font-style: italic">(Speed easing factor)</span> will determine how quickly or slowly the camera moves to its new position. Higher numbers means slower movement <span style="font-style: italic">(1 = instant)</span>.<span style="font-style: italic">Recenters camera to specified location.</span>http://i.imgur.com/oSOl0wA.png <span style="display: none;">Camera Off</span>Resets camera to player and default zoom.<span style="font-style: italic">Resets the camera back to default settings of 100% zoom, 0 offset from character.</span>http://i.imgur.com/V3lR32l.png <span style="display: none;">Set Music</span>Changes music to specified theme.- You cannot skip to a different point in a current song. You must set the music to "(no music)" and change back to change position in a song.- "Start Position: " defines at which point of the song to start playing. It currently only takes integers.List of music:
<hr>
+
<a name="aaa3"></a><img src="http://i.imgur.com/b74lQiL.png" alt="Image"><span style="display: none;">Game</span>In the "Game" section, you can find various functions which alter gameplay.<img src="http://i.imgur.com/9rO0tp1.png" alt="Image"><span style="display: none;">Gravity</span>Changes the orientation of the player's gravity to the specified angle.- Gravity strength is not implemented as of the current version.- Only affects the player.<span style="font-style: italic">Will set universal gravity to new variables input in this function.</span><img src="http://i.imgur.com/e5bm6Q6.png" alt="Image"><span style="display: none;">Time control</span>Slows down game events and animations to a specified percentage.- <span style="font-weight: bold">WARNING: ONCE SET, IT WILL STAY SET WHEN EXITING THE LEVEL UNTIL IT IS SET BACK TO 100.</span>- Does not affect "Sleep" function.<span style="font-style: italic">Changes the speed of time to the percentage given</span><img src="http://i.imgur.com/f7qviqm.png" alt="Image"><span style="display: none;">Begin Cinema</span>Activates <span style="font-style: italic">Cinema Mode</span>, in which the player is frozen, but everything else moves normally.- Useful for cutscenes.<span style="font-style: italic">Will change the gameplay to cinema mode. Character is paused/cannot be controlled/hurt, time flow is not </span>a<span style="font-style: italic">ffected.</span><img src="http://i.imgur.com/PxnPWj0.png" alt="Image"><span style="display: none;">End Cinema</span>Stops <span style="font-style: italic">Cinema Mode</span> and game returns to normal.<span style="font-style: italic">Will turn off cinema mode</span><img src="http://i.imgur.com/LC3mKx1.png" alt="Image"><span style="display: none;">Move Camera</span>Moves the camera to specified absolute or relative coordinates.- Relative coordinates do not work currently.If "use tag"" is checked, <span style="font-style: italic">Instead of using x and y coordinates, will lock onto given item (and will follow if the item moves)</span>. x and y will specify the <span style="font-style: italic">relative offset from item</span>You can also set Absolute Zoom (50% = zoomed out) (50% - 400%) or Relative Zoom (-50% = zoomed out) (-50% - 300%)."Speed:" <span style="font-style: italic">(Speed easing factor)</span> will determine how quickly or slowly the camera moves to its new position. Higher numbers means slower movement <span style="font-style: italic">(1 = instant)</span>.<span style="font-style: italic">Recenters camera to specified location.</span><img src="http://i.imgur.com/oSOl0wA.png" alt="Image"><span style="display: none;">Camera Off</span>Resets camera to player and default zoom.<span style="font-style: italic">Resets the camera back to default settings of 100% zoom, 0 offset from character.</span><img src="http://i.imgur.com/V3lR32l.png" alt="Image"><span style="display: none;">Set Music</span>Changes music to specified theme.- You cannot skip to a different point in a current song. You must set the music to "(no music)" and change back to change position in a song.- "Start Position: " defines at which point of the song to start playing. It currently only takes integers.List of music:
+
 
<ul>
 
<ul>
 
   <li>(no music)</li>
 
   <li>(no music)</li>
Line 348: Line 366:
 
   <li>Lava</li>
 
   <li>Lava</li>
 
</ul>
 
</ul>
<span style="font-style: italic">Changes current background music.</span><a href="http://i.imgur.com/yfCYZro.png" target="_blank"><img src="http://i.imgur.com/yfCYZro.png" width="306" height="34" border="0"></a><span style="display: none;">Play Sound</span>Plays a specified sound from the game.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&amp;t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the sounds you can currently play using this trigger.- You can also specify the volume, from 0.1 to 3.0.<span style="font-style: italic">Plays the Sound Effect.</span><img src="http://i.imgur.com/68fSj8E.png" alt="Image"><span style="display: none;">Move Character</span>Moves the player to specified absolute or relative coordinates.Can also set absolute or relative speed.- Relative xspeed does not work currently.<span style="font-style: italic">Moves (teleports) the main character.</span>
+
<span style="font-style: italic">Changes current background music.</span><a href="http://i.imgur.com/yfCYZro.png" target="_blank">http://i.imgur.com/yfCYZro.png" width="306" height="34" border="0"></a><span style="display: none;">Play Sound</span>Plays a specified sound from the game.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&amp;t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the sounds you can currently play using this trigger.- You can also specify the volume, from 0.1 to 3.0.<span style="font-style: italic">Plays the Sound Effect.</span>http://i.imgur.com/68fSj8E.png <span style="display: none;">Move Character</span>Moves the player to specified absolute or relative coordinates.Can also set absolute or relative speed.- Relative xspeed does not work currently.<span style="font-style: italic">Moves (teleports) the main character.</span>
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
<a name="aaa4"></a>http://i.imgur.com/j3aABKG.png <span style="display: none;">Weather</span>In the "Weather" section, you can find various weather effects.http://i.imgur.com/5OyCsLK.png <span style="display: none;">Set Rain</span>Make it rain with a specified strength.- <span style="font-weight: bold">Warning: This function is leaky and you may get wet.</span><span style="font-style: italic">Changes the strength of rain. Set it to 0 to turn off rain.</span>http://i.imgur.com/E9v55MG.png <span style="display: none;">Set Snow</span>Let it snow with a specified strength.<span style="font-style: italic">Changes the strength of snow. Set it to 0 to turn off <span style="text-decoration: underline">snow</span>.</span><a href="http://i.imgur.com/nfSSaq8.png" target="_blank">http://i.imgur.com/nfSSaq8.png" width="306" height="33" border="0"></a><span style="display: none;">Set Darkness</span>Creates a darkness effect with a specified strength.- There is a circle of light around:  
<a name="aaa4"></a><img src="http://i.imgur.com/j3aABKG.png" alt="Image"><span style="display: none;">Weather</span>In the "Weather" section, you can find various weather effects.<img src="http://i.imgur.com/5OyCsLK.png" alt="Image"><span style="display: none;">Set Rain</span>Make it rain with a specified strength.- <span style="font-weight: bold">Warning: This function is leaky and you may get wet.</span><span style="font-style: italic">Changes the strength of rain. Set it to 0 to turn off rain.</span><img src="http://i.imgur.com/E9v55MG.png" alt="Image"><span style="display: none;">Set Snow</span>Let it snow with a specified strength.<span style="font-style: italic">Changes the strength of snow. Set it to 0 to turn off <span style="text-decoration: underline">snow</span>.</span><a href="http://i.imgur.com/nfSSaq8.png" target="_blank"><img src="http://i.imgur.com/nfSSaq8.png" width="306" height="33" border="0"></a><span style="display: none;">Set Darkness</span>Creates a darkness effect with a specified strength.- There is a circle of light around:  
+
 
<ul>
 
<ul>
 
   <li>Player</li>
 
   <li>Player</li>
Line 362: Line 379:
 
   <li>Invisible Light Source</li>
 
   <li>Invisible Light Source</li>
 
</ul>
 
</ul>
<span style="font-style: italic">Adds a darkness effect that makes it difficult to see from far away from the character.</span><a href="http://i.imgur.com/bQ0zjhS.png" target="_blank"><img src="http://i.imgur.com/bQ0zjhS.png" width="306" height="35" border="0"></a><span style="display: none;">Spawn Earthquake</span>Causes an earthquake with the specified magnitude/strength and duration.<span style="font-style: italic">Shakes the screen</span>
+
<span style="font-style: italic">Adds a darkness effect that makes it difficult to see from far away from the character.</span><a href="http://i.imgur.com/bQ0zjhS.png" target="_blank">http://i.imgur.com/bQ0zjhS.png" width="306" height="35" border="0"></a><span style="display: none;">Spawn Earthquake</span>Causes an earthquake with the specified magnitude/strength and duration.<span style="font-style: italic">Shakes the screen</span>
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
<a name="aaa5"></a>http://i.imgur.com/sZi5sZx.png <span style="display: none;">Text</span>The "Text" section includes various ways of displaying text.-Some <a href="http://en.wikipedia.org/wiki/HTML" class="postlink">HTML 4</a> is allowed.- <span style="font-style: italic">{$g_VARIABLENAME}</span> in a text box with the a global variable in place of "<span style="font-style: italic">g_VARIABLENAME</span>" will display that global variable.Known working HTML tags (Stuff in brackets "[]" are known working parameter types. Known working parameters are separated by "|"):
<a name="aaa5"></a><img src="http://i.imgur.com/sZi5sZx.png" alt="Image"><span style="display: none;">Text</span>The "Text" section includes various ways of displaying text.-Some <a href="http://en.wikipedia.org/wiki/HTML" class="postlink">HTML 4</a> is allowed.- <span style="font-style: italic">{$g_VARIABLENAME}</span> in a text box with the a global variable in place of "<span style="font-style: italic">g_VARIABLENAME</span>" will display that global variable.Known working HTML tags (Stuff in brackets "[]" are known working parameter types. Known working parameters are separated by "|"):
+
 
<ul>
 
<ul>
 
   <li>&lt;p [align="left|center|right"]&gt;&lt;/p&gt;</li>
 
   <li>&lt;p [align="left|center|right"]&gt;&lt;/p&gt;</li>
Line 375: Line 391:
 
   <li>&lt;img [src="" width="" height=""]&gt;&lt;/img&gt; (currently broken)</li>
 
   <li>&lt;img [src="" width="" height=""]&gt;&lt;/img&gt; (currently broken)</li>
 
</ul>
 
</ul>
<img src="http://i.imgur.com/N23pTqJ.png" alt="Image"><span style="display: none;">Screen Text</span>Displays text similar to the way signs display text. Freezes the character.- Type (0-12) determines the color and texture of the background behind the text.<span style="font-style: italic">Pauses character and attaches text covering the screen.</span><img src="http://i.imgur.com/Ol9Zkpj.png" alt="Image"><span style="display: none;">Subtitle Text On</span>A text covers the screen that does not pause the character. Can be in different parts of the screen.- Type (0-3) determines the position of the subtitle on the screen.- "Alpha:" determines the opacity of the white background behind the text.- Turns off when trigger runs out.<span style="font-style: italic">Does not pause character. Will remain until "subtitle off" is called the thread ends. Only 1 subtitle per thread/trigger can be active at once.</span><img src="http://i.imgur.com/DI0PklJ.png" alt="Image"><span style="display: none;">Subtitle Text Off</span>Turns off the subtitle currently being displayed from that trigger.<span style="font-style: italic">Removes any subtitle text this thread attached.</span><a href="http://i.imgur.com/OhslyPD.png" target="_blank"><img src="http://i.imgur.com/OhslyPD.png" width="306" height="35" border="0"></a><span style="display: none;">Dialog Text</span>Same as Screen Text, but displays as a dialog at the bottom of the screen, so you can still see the level.<span style="font-style: italic">Pauses character and shows dialog.</span>
+
http://i.imgur.com/N23pTqJ.png <span style="display: none;">Screen Text</span>Displays text similar to the way signs display text. Freezes the character.- Type (0-12) determines the color and texture of the background behind the text.<span style="font-style: italic">Pauses character and attaches text covering the screen.</span>http://i.imgur.com/Ol9Zkpj.png <span style="display: none;">Subtitle Text On</span>A text covers the screen that does not pause the character. Can be in different parts of the screen.- Type (0-3) determines the position of the subtitle on the screen.- "Alpha:" determines the opacity of the white background behind the text.- Turns off when trigger runs out.<span style="font-style: italic">Does not pause character. Will remain until "subtitle off" is called the thread ends. Only 1 subtitle per thread/trigger can be active at once.</span>http://i.imgur.com/DI0PklJ.png <span style="display: none;">Subtitle Text Off</span>Turns off the subtitle currently being displayed from that trigger.<span style="font-style: italic">Removes any subtitle text this thread attached.</span><a href="http://i.imgur.com/OhslyPD.png" target="_blank">http://i.imgur.com/OhslyPD.png" width="306" height="35" border="0"></a><span style="display: none;">Dialog Text</span>Same as Screen Text, but displays as a dialog at the bottom of the screen, so you can still see the level.<span style="font-style: italic">Pauses character and shows dialog.</span>
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
<a name="aaa6"></a>http://i.imgur.com/zZobJt4.png <span style="display: none;">Item</span>Various functions (Currently only 1) for manipulating items can be found in the "Item" section.http://i.imgur.com/Dr9xZxR.png <span style="display: none;">Move Item</span>Moves a specified item to absolute or relative coordinates.- "Chars stick to" determines whether the player or enemies move with the item when standing on it. <span style="font-style: italic">If a platform is moved, characters on it will move with it.</span><span style="font-style: italic">Moves any items with the given linkage.</span><a href="http://i.imgur.com/BnykldF.png" target="_blank">http://i.imgur.com/BnykldF.png" width="306" height="35" border="0"></a><span style="display: none;">Scale Item</span>Alters the X scale, Y scale, and/or rotation of a specified item with absolute or relative values.- Only works on items that are already scaleable and rotatable.- Works on all disabled items.<span style="font-style: italic">Changes the scaling and/or rotation of a rotatable/scale-able item with a given linkage.</span><a href="http://i.imgur.com/u0SmKmY.png" target="_blank">http://i.imgur.com/u0SmKmY.png" width="306" height="35" border="0"></a><span style="display: none;">Teleport Enemy</span>Teleports the specified enemy to specified coordinates.<span style="font-style: italic">Teleports an enemy with the given linkage. Absolute: sets the item's x,y to that. Relative: increases it by x,y.</span><a href="http://i.imgur.com/77Sdjds.png" target="_blank">http://i.imgur.com/77Sdjds.png" width="306" height="35" border="0"></a><span style="display: none;">Create Item Drop</span>Spawns an item at specified coordinates or coordinates relative to specified item.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&amp;t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the item drops you can create.<span style="font-style: italic">Creates an item drop at either x and y, or at given tag's position plus offset of x and y.</span><a href="http://i.imgur.com/ACnumZv.png" target="_blank">http://i.imgur.com/ACnumZv.png" width="306" height="35" border="0"></a><span style="display: none;">Dissolve Effect</span>Pauses the compiler for a specified number of frames, fades a specified item's alpha value to 1, then continues the compiler.- Sets the items alpha to 100 before it starts fading.- It is recommended to move the item away from the scene right afterwards, because it doesn't dissolve completely to 0, despite what the description says.<span style="font-style: italic">Makes the item's alpha fade to 0.</span><a href="http://i.imgur.com/U17xIAo.png" target="_blank">http://i.imgur.com/U17xIAo.png" width="306" height="35" border="0"></a><span style="display: none;">Set Color</span><span style="font-style: italic">This trigger has yet to be programmed</span>
<a name="aaa6"></a><img src="http://i.imgur.com/zZobJt4.png" alt="Image"><span style="display: none;">Item</span>Various functions (Currently only 1) for manipulating items can be found in the "Item" section.<img src="http://i.imgur.com/Dr9xZxR.png" alt="Image"><span style="display: none;">Move Item</span>Moves a specified item to absolute or relative coordinates.- "Chars stick to" determines whether the player or enemies move with the item when standing on it. <span style="font-style: italic">If a platform is moved, characters on it will move with it.</span><span style="font-style: italic">Moves any items with the given linkage.</span><a href="http://i.imgur.com/BnykldF.png" target="_blank"><img src="http://i.imgur.com/BnykldF.png" width="306" height="35" border="0"></a><span style="display: none;">Scale Item</span>Alters the X scale, Y scale, and/or rotation of a specified item with absolute or relative values.- Only works on items that are already scaleable and rotatable.- Works on all disabled items.<span style="font-style: italic">Changes the scaling and/or rotation of a rotatable/scale-able item with a given linkage.</span><a href="http://i.imgur.com/u0SmKmY.png" target="_blank"><img src="http://i.imgur.com/u0SmKmY.png" width="306" height="35" border="0"></a><span style="display: none;">Teleport Enemy</span>Teleports the specified enemy to specified coordinates.<span style="font-style: italic">Teleports an enemy with the given linkage. Absolute: sets the item's x,y to that. Relative: increases it by x,y.</span><a href="http://i.imgur.com/77Sdjds.png" target="_blank"><img src="http://i.imgur.com/77Sdjds.png" width="306" height="35" border="0"></a><span style="display: none;">Create Item Drop</span>Spawns an item at specified coordinates or coordinates relative to specified item.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&amp;t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the item drops you can create.<span style="font-style: italic">Creates an item drop at either x and y, or at given tag's position plus offset of x and y.</span><a href="http://i.imgur.com/ACnumZv.png" target="_blank"><img src="http://i.imgur.com/ACnumZv.png" width="306" height="35" border="0"></a><span style="display: none;">Dissolve Effect</span>Pauses the compiler for a specified number of frames, fades a specified item's alpha value to 1, then continues the compiler.- Sets the items alpha to 100 before it starts fading.- It is recommended to move the item away from the scene right afterwards, because it doesn't dissolve completely to 0, despite what the description says.<span style="font-style: italic">Makes the item's alpha fade to 0.</span><a href="http://i.imgur.com/U17xIAo.png" target="_blank"><img src="http://i.imgur.com/U17xIAo.png" width="306" height="35" border="0"></a><span style="display: none;">Set Color</span><span style="font-style: italic">This trigger has yet to be programmed</span>
+
 
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
<a name="aaa7"></a>http://i.imgur.com/ly5r5jV.png <span style="display: none;">Tile</span>Various functions (Currently only 1) for manipulating tiles can be found in the "Tile" section.http://i.imgur.com/CFFILYS.png <span style="display: none;">Edit Tiles</span>Changes a tile(s) at a specified location.- When in a tile layer, find the coordinates of the tile you want to change. Place the new tile somewhere, highlight it, and copy it. Go back to the trigger and paste the copied tile in the "tile data:" field.- "Back Layer" checkbox: <span style="font-style: italic">If true, alters the tiles in the back layer.</span><span style="font-style: italic">Select &amp; Copy the new tiles and Paste into the tile data and then choose the x and y (in units of tiles, from to-left)</span>
<hr>
+
 
<a name="aaa7"></a><img src="http://i.imgur.com/ly5r5jV.png" alt="Image"><span style="display: none;">Tile</span>Various functions (Currently only 1) for manipulating tiles can be found in the "Tile" section.<img src="http://i.imgur.com/CFFILYS.png" alt="Image"><span style="display: none;">Edit Tiles</span>Changes a tile(s) at a specified location.- When in a tile layer, find the coordinates of the tile you want to change. Place the new tile somewhere, highlight it, and copy it. Go back to the trigger and paste the copied tile in the "tile data:" field.- "Back Layer" checkbox: <span style="font-style: italic">If true, alters the tiles in the back layer.</span><span style="font-style: italic">Select &amp; Copy the new tiles and Paste into the tile data and then choose the x and y (in units of tiles, from to-left)</span>
+
<a name="aaa8"></a>http://i.imgur.com/upG81JW.png <span style="display: none;">Special</span>The "Special" section includes various functions for controlling other Triggers and Platforms.http://i.imgur.com/sWGscgh.png <span style="display: none;">Turn On Trigger</span>Enables a specified trigger to be activated.<span style="font-style: italic">If given the tag of a trigger, will allow the trigger to be activated (does not actually activate it).</span>http://i.imgur.com/LUxhi24.png <span style="display: none;">Turn Off Trigger</span>Disables a specified trigger.<span style="font-style: italic">If given the tag of a trigger, will prevent the trigger from being able to be activated again (Does not stop a currently running thread).</span>http://i.imgur.com/vxdhhXQ.png <span style="display: none;">Activate Trigger</span>Activates a specified trigger.- Does not matter whether that trigger is "on" or "off"<span style="font-style: italic">If given the tag of a trigger, will activate the trigger's function (regardless of if it is on/off).</span>http://i.imgur.com/DMPdyWq.png <span style="display: none;">Stop Trigger</span>Stops a specified trigger if it is running.<span style="font-style: italic">If given the tag of a currently-running trigger thread, will immediately stop it.</span>http://i.imgur.com/dWc9rC3.png <span style="display: none;">Play Platform</span>Specified platform starts moving along its path if it's not already.<span style="font-style: italic">If given the tag of a platform not in motion, will cause platform to move (if paused/not started moving).</span>http://i.imgur.com/MIqtwMv.png <span style="display: none;">Pause Platform</span>Pauses a specified platform at its current location.<span style="font-style: italic">If given the tag of a platform in motion, will pause the platform in it's current place.</span>http://i.imgur.com/o5EunU1.png <span style="display: none;">Reset Platform</span>Moves a platform back to its starting position and pauses it.<span style="font-style: italic">If given the tag of a platform, will reset it back to the beginning (and pauses it there).</span>
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
 
<hr>
+
<a name="aaa9"></a>http://i.imgur.com/Wn3UXZ6.png <span style="display: none;">// comment</span>"//comment" allows you to store a message in the trigger that has no effect on what the code does.<span style="font-style: italic">Enter any desired comment here (has no effect outside level designer).</span><span style="font-size: 250%; line-height: 116%;">"Secret" Functions:</span>
<a name="aaa8"></a><img src="http://i.imgur.com/upG81JW.png" alt="Image"><span style="display: none;">Special</span>The "Special" section includes various functions for controlling other Triggers and Platforms.<img src="http://i.imgur.com/sWGscgh.png" alt="Image"><span style="display: none;">Turn On Trigger</span>Enables a specified trigger to be activated.<span style="font-style: italic">If given the tag of a trigger, will allow the trigger to be activated (does not actually activate it).</span><img src="http://i.imgur.com/LUxhi24.png" alt="Image"><span style="display: none;">Turn Off Trigger</span>Disables a specified trigger.<span style="font-style: italic">If given the tag of a trigger, will prevent the trigger from being able to be activated again (Does not stop a currently running thread).</span><img src="http://i.imgur.com/vxdhhXQ.png" alt="Image"><span style="display: none;">Activate Trigger</span>Activates a specified trigger.- Does not matter whether that trigger is "on" or "off"<span style="font-style: italic">If given the tag of a trigger, will activate the trigger's function (regardless of if it is on/off).</span><img src="http://i.imgur.com/DMPdyWq.png" alt="Image"><span style="display: none;">Stop Trigger</span>Stops a specified trigger if it is running.<span style="font-style: italic">If given the tag of a currently-running trigger thread, will immediately stop it.</span><img src="http://i.imgur.com/dWc9rC3.png" alt="Image"><span style="display: none;">Play Platform</span>Specified platform starts moving along its path if it's not already.<span style="font-style: italic">If given the tag of a platform not in motion, will cause platform to move (if paused/not started moving).</span><img src="http://i.imgur.com/MIqtwMv.png" alt="Image"><span style="display: none;">Pause Platform</span>Pauses a specified platform at its current location.<span style="font-style: italic">If given the tag of a platform in motion, will pause the platform in it's current place.</span><img src="http://i.imgur.com/o5EunU1.png" alt="Image"><span style="display: none;">Reset Platform</span>Moves a platform back to its starting position and pauses it.<span style="font-style: italic">If given the tag of a platform, will reset it back to the beginning (and pauses it there).</span>
+
 
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
<hr>
+
<a name="aaa9"></a><img src="http://i.imgur.com/Wn3UXZ6.png" alt="Image"><span style="display: none;">// comment</span>"//comment" allows you to store a message in the trigger that has no effect on what the code does.<span style="font-style: italic">Enter any desired comment here (has no effect outside level designer).</span><span style="font-size: 250%; line-height: 116%;">"Secret" Functions:</span>
+
<div style="text-align:right;"><span style="font-size: 85%; line-height: 116%;"><a href="#aaatop">Top^</a></span></div>
+
<hr>
+
 
<span style="font-size: 150%; line-height: 116%;">Open Shop:</span>
 
<span style="font-size: 150%; line-height: 116%;">Open Shop:</span>
 
<dl class="codebox">
 
<dl class="codebox">

Revision as of 03:25, 17 May 2015

From AwesomeJRFD's Trigger's Guide

An Explanation of Triggers

By AwesomeJRFD and Raz

Have you seen this screen when opening a trigger item's properties?

An empty triggers tab


Triggers are an event based

This is a trigger tab. With it, you can manipulate items, the weather, the camera, and even the player to enable advanced functionality in your level.

Users have made the following with triggers:

General

Triggers are an ASM based event system. This means that when a trigger is activated (by touching it, pressing it, killing an enemy, collecting coins, etc), it runs each function (event) from top to bottom in order. They can use variables, which are are numbers that can be stored by name.

Runouw wrote:

At the moment there are about 37 trigger functions in total to pick from. Triggers are meant to function very similar to ASSEMBLY code and each instruction occurs immediately after the previous one finishes executing. You are now able to pick instructions that do branching and goto statements and set global and local variables which let you make really advanced levels.


When a trigger completes its last function, it stops executing. Triggers have a limit of 128 functions per frame. After which, it continues executing the trigger the next frame.

Vocabulary

Words and phrases that will be used in this tutorial:

Word Definition
Trigger An executable script in Last Legacy played in the trigger's thread.
Function A command that a trigger can execute. It can be an action method, a sleep method, or a branch method.
Script A series of functions, played in order with branching and conditionals.
Thread Abstract holder for scripts that execute them. They can be started, paused, or stopped at any time. Multiple threads from different triggers can be running at once.
Variable Values that are stored by a textual name. That value can be changed at any time.
Tag A name that you can give an item. Trigger functions can reference items by their tag.
Coordinates X and Y position of a tile or item in the level.
Camera The portion of the level which is currently visible.

Trigger Types

Type Description Items
onHit Activates when the player touches the item in which the trigger is running from. Invisible Hitbox, Basic Platform, Block, Planet
onPress Activates when a button is pressed. Push Switch
onDefeat Activates when an enemy is killed. Enemy Crab, Enemy Mushroom, Grock, Enemy Wolf, Enemy Fire Mage, Enemy Electric Mage, Enemy ??? Mage, Enemy Ice Mage, Enemy Dark Mage, Enemy Specter A, Enemy Specter B, Enemy Specter C, Enemy Specter D, Enemy Specter, Enemy Dark Beast, Enemy Knight, Enemy Powerful Knight, Enemy Really Powerful Knight, Delta Phantom Boss, Boss
onRead Activates when a sign is read. Wooden Sign (readable), Small Wooden Sign (readable), Hanging Sign (readable), Engraved Stone Tablet
onCollect Activates when the item is collected. Square, Super Square, Small Heart, Large Heart
onTalk Activates when an NPC is talked to. NPC, NPC - Old
onOpen Activates when a chest is opened. Openable Treasure Chest
onTurnOn Activates when a switch is turned on. Electric Switch, Lever Switch
onTurnOff Activates when a switch is turned off. Electric Switch

Coordinates

You may have learned that in a coordinate plane, Y values increase as they go up. In programming, and therefore in Last Legacy, the opposite is true, as shown in this picture:

coordinates.gif

There are two kinds of coordinates
  • Item Coordinates
Each Item Coordinate is a pixel. For reference, the player is 47 pixels tall, and a tile is 32x32 pixels.
  • Tile Coordinates
Each unit shown on the in-game grid is a Tile Coordinate and tiles are aligned to them. You can toggle the visibility of the grid in "View -> Display Grid".

To calculate a tile coordinate from an item coordinate, multiply the coordinates by 32. Inversely, to calculate an item coordinate from a tile coordinate, multiply the coordinates by 32.


When moving stuff using triggers:

Type Description
Absolute Set the exact values. Sets the item's x/y to that.
Relative Positive numbers will be added on to the current value. Negative numbers will be subtracted from the current value. Increases it by x/y.

Tags

Tags are "names" you can give to items. You can use them to identify specifically which items you want a trigger function to act upon.

For example, if you tag an enemy Crab as "Bob", then you can refer to it with the Move Items function. This would allow you to teleport the enemy wherever you specify when the Move items function is activated.

  • Multiple items can share the same tag.
  • "this" and "self" refer to the item that the current trigger belongs to.

In a function, Copy the tag from another item to reference/do something with it here.

Variables

Stores 32 bit integer value (-2147483648 through 2147483648. If you go past the limit, the value will wrap around).

Types of Variables

<thead> </thead>
Type Description
Local Local vars begin with a character (a-z, A-Z, 0-9), and are only accessible by the trigger they were initialized in.
Global Vars with the prefix "g_" are global (accessible to other triggers and remain across level splitters).
Static Vars with the prefix "s_" are global, and do not reset when the player dies and respawns.

Special global variables

  • "g_COINS" = Amount of Squares collected.
  • "g_PLAYER_NAME" = Player's name. Only works in Story Mode levels since there is no way to change it in the designer. "Hero" by default.

Functions

xzTXmzs.png

Press this Add New Function button to add a function. You will be presented with a drop-down menu that looks sort of like the one below. Click on a button to see what type of functions are listed in that category.

NEQh99r.png

ow8C8ua.png

b74lQiL.png

j3aABKG.png

sZi5sZx.png

zZobJt4.png

gCqpoxa.png

upG81JW.png

Wn3UXZ6.png

Function List

<a name="aaa1"></a>NEQh99r.png Flow Control"Flow Control" functions are for altering how the code runs and the order in which the compiler reads it.MUbDxjZ.png Branch If...The compiler will skip to the line you specify when this command is run if a specified variable meets certain conditions.If statement is true, will jump and continue executing code from input line. Otherwise ignores this function.

<thead> </thead>
Symbol Meaning
== Is equal to
!= Is not equal to
> Is greater than
< Is less than
>= Is greater than or equal to
<= Is less than or equal to

B2RB8lr.png Go toThe compiler will skip to the line you specify when this command is run.Jump and continue executing code from input line.F2vdmaV.png SleepThis will stop the compiler at the current line for a duration of the specified number of frames, then it will continue.- Changing the game setting so 60 frames per second will NOT change how sleep works.Will pause (sleep) this thread for X amount of frames (30 frames = 1 second)

<thead> </thead>
# of Frames Actual Duration
3 Decisecond
30 Second
1800 Minute
108000 Hour
2592000 Day
18144000 Week
77760000 Month (30 days)
946080000 Year (non leap year)
9460800000 Decade (no leap years)
94608000000 Century (no leap years)
946080000000 Millenium (no leap years)

VvQ76rm.png ExitStops the trigger.Will stop this thread immediately.vU9o7Ht.png Sleep until not touchedPauses the compiler at this line until the player is no longer touching the item from which the line is run.- onHit triggers only.Invisible Hitboxes:Will pause (sleep) this thread until player is no longer touching this.Platforms:

<thead> </thead>
Parameter Description
offDuration Sleep until the player is no longer touching the platform, and then for a specified amount of frames after that.Number of frames after player jumps off platform and before this thread is awakened. If 0, then relies solely on timeOut (below) to control when to awaken.
timeOut Same as normal sleep, but if it is -1 and the platform has a custom path, it will sleep until the platform reaches the end of its path.Number of frames after start of this thread's sleep and until this thread is forced awake. If -1 and uses a custom path, then will awaken at end of path. If 0, then relies of offDuration (above) to control when to awaken.

Will pause (sleep) this thread until:timeOut#-of-frames pass OR: offDuration#-of-frames pass after player jumps off platform.<a href="pnn756S.png" target="_blank">pnn756S.png" width="306" height="35" border="0"></a>Sleep until on groundThis will stop the compiler at the current line until the player touches the ground.Will sleep thread until the player is touching the ground.

<a name="aaa2"></a>ow8C8ua.png <a name="aaa2"></a>MathIn the "Math" section, you can manipulate variables using calculations.flP00z3.png SetWill set a variable to a specified number or variable.Sets a given var to an integer or value of another var.3S31zOV.png AddWill set a variable to the sum of two numbers or variables.Sets given var to sum of 2 ints/vars (a = b + c).GI9K95D.png SubtractWill set a variable to the difference of two numbers or variables.Sets given var to difference of 2 ints/vars (a = b - c).

<a name="aaa3"></a>b74lQiL.png GameIn the "Game" section, you can find various functions which alter gameplay.9rO0tp1.png GravityChanges the orientation of the player's gravity to the specified angle.- Gravity strength is not implemented as of the current version.- Only affects the player.Will set universal gravity to new variables input in this function.e5bm6Q6.png Time controlSlows down game events and animations to a specified percentage.- WARNING: ONCE SET, IT WILL STAY SET WHEN EXITING THE LEVEL UNTIL IT IS SET BACK TO 100.- Does not affect "Sleep" function.Changes the speed of time to the percentage givenf7qviqm.png Begin CinemaActivates Cinema Mode, in which the player is frozen, but everything else moves normally.- Useful for cutscenes.Will change the gameplay to cinema mode. Character is paused/cannot be controlled/hurt, time flow is not affected.PxnPWj0.png End CinemaStops Cinema Mode and game returns to normal.Will turn off cinema modeLC3mKx1.png Move CameraMoves the camera to specified absolute or relative coordinates.- Relative coordinates do not work currently.If "use tag"" is checked, Instead of using x and y coordinates, will lock onto given item (and will follow if the item moves). x and y will specify the relative offset from itemYou can also set Absolute Zoom (50% = zoomed out) (50% - 400%) or Relative Zoom (-50% = zoomed out) (-50% - 300%)."Speed:" (Speed easing factor) will determine how quickly or slowly the camera moves to its new position. Higher numbers means slower movement (1 = instant).Recenters camera to specified location.oSOl0wA.png Camera OffResets camera to player and default zoom.Resets the camera back to default settings of 100% zoom, 0 offset from character.V3lR32l.png Set MusicChanges music to specified theme.- You cannot skip to a different point in a current song. You must set the music to "(no music)" and change back to change position in a song.- "Start Position: " defines at which point of the song to start playing. It currently only takes integers.List of music:

  • (no music)
  • Adventure Theme
  • Void Meadow
  • Cathedral
  • Charge
  • Desert Castle
  • Boss Battle
  • Amyxo
  • Espionage
  • Final Break
  • Icy Dungeon
  • Marcia Minor
  • Desert Theme
  • Techno Cave
  • Twisted Polka
  • Winter Theme
  • Smooth Jazz
  • In a Spirit's Presence
  • Sanctuary Echo - A capella
  • Sanctuary Echo - Orchestral
  • Inspirational Rock
  • Dark March
  • Ambient Wind SFX Loop
  • Final Theme
  • Town Theme - Valtameri
  • Overworld
  • Overworld - Piano
  • Gflat March
  • Floating Digital Clouds
  • Lava

Changes current background music.<a href="yfCYZro.png" target="_blank">yfCYZro.png" width="306" height="34" border="0"></a>Play SoundPlays a specified sound from the game.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the sounds you can currently play using this trigger.- You can also specify the volume, from 0.1 to 3.0.Plays the Sound Effect.68fSj8E.png Move CharacterMoves the player to specified absolute or relative coordinates.Can also set absolute or relative speed.- Relative xspeed does not work currently.Moves (teleports) the main character.

<a name="aaa4"></a>j3aABKG.png WeatherIn the "Weather" section, you can find various weather effects.5OyCsLK.png Set RainMake it rain with a specified strength.- Warning: This function is leaky and you may get wet.Changes the strength of rain. Set it to 0 to turn off rain.E9v55MG.png Set SnowLet it snow with a specified strength.Changes the strength of snow. Set it to 0 to turn off snow.<a href="nfSSaq8.png" target="_blank">nfSSaq8.png" width="306" height="33" border="0"></a>Set DarknessCreates a darkness effect with a specified strength.- There is a circle of light around:

  • Player
  • Delta Orb (+ rolling)
  • Delta Negate Orb (+ rolling) (less light than Delta Orb)
  • Weapon/turret projectile
  • Enemies (not dependent on size)
  • Torch
  • Brick Fireplace
  • Invisible Light Source

Adds a darkness effect that makes it difficult to see from far away from the character.<a href="bQ0zjhS.png" target="_blank">bQ0zjhS.png" width="306" height="35" border="0"></a>Spawn EarthquakeCauses an earthquake with the specified magnitude/strength and duration.Shakes the screen

<a name="aaa5"></a>sZi5sZx.png TextThe "Text" section includes various ways of displaying text.-Some <a href="http://en.wikipedia.org/wiki/HTML" class="postlink">HTML 4</a> is allowed.- {$g_VARIABLENAME} in a text box with the a global variable in place of "g_VARIABLENAME" will display that global variable.Known working HTML tags (Stuff in brackets "[]" are known working parameter types. Known working parameters are separated by "|"):

  • <p [align="left|center|right"]></p>
  • <b></b>
  • <i></i>
  • <u></u>
  • <font [size="" width="" color="" face=""]></font>
  • <a [href="" target="_blank" letterspacing=""]></a>
  • <img [src="" width="" height=""]></img> (currently broken)

N23pTqJ.png Screen TextDisplays text similar to the way signs display text. Freezes the character.- Type (0-12) determines the color and texture of the background behind the text.Pauses character and attaches text covering the screen.Ol9Zkpj.png Subtitle Text OnA text covers the screen that does not pause the character. Can be in different parts of the screen.- Type (0-3) determines the position of the subtitle on the screen.- "Alpha:" determines the opacity of the white background behind the text.- Turns off when trigger runs out.Does not pause character. Will remain until "subtitle off" is called the thread ends. Only 1 subtitle per thread/trigger can be active at once.DI0PklJ.png Subtitle Text OffTurns off the subtitle currently being displayed from that trigger.Removes any subtitle text this thread attached.<a href="OhslyPD.png" target="_blank">OhslyPD.png" width="306" height="35" border="0"></a>Dialog TextSame as Screen Text, but displays as a dialog at the bottom of the screen, so you can still see the level.Pauses character and shows dialog.

<a name="aaa6"></a>zZobJt4.png ItemVarious functions (Currently only 1) for manipulating items can be found in the "Item" section.Dr9xZxR.png Move ItemMoves a specified item to absolute or relative coordinates.- "Chars stick to" determines whether the player or enemies move with the item when standing on it. If a platform is moved, characters on it will move with it.Moves any items with the given linkage.<a href="BnykldF.png" target="_blank">BnykldF.png" width="306" height="35" border="0"></a>Scale ItemAlters the X scale, Y scale, and/or rotation of a specified item with absolute or relative values.- Only works on items that are already scaleable and rotatable.- Works on all disabled items.Changes the scaling and/or rotation of a rotatable/scale-able item with a given linkage.<a href="u0SmKmY.png" target="_blank">u0SmKmY.png" width="306" height="35" border="0"></a>Teleport EnemyTeleports the specified enemy to specified coordinates.Teleports an enemy with the given linkage. Absolute: sets the item's x,y to that. Relative: increases it by x,y.<a href="77Sdjds.png" target="_blank">77Sdjds.png" width="306" height="35" border="0"></a>Create Item DropSpawns an item at specified coordinates or coordinates relative to specified item.- Go to the <a href="http://runouw.com/forums/viewtopic.php?f=53&t=42110#p249172" class="postlink">Complete ID List</a> for a list of all of the item drops you can create.Creates an item drop at either x and y, or at given tag's position plus offset of x and y.<a href="ACnumZv.png" target="_blank">ACnumZv.png" width="306" height="35" border="0"></a>Dissolve EffectPauses the compiler for a specified number of frames, fades a specified item's alpha value to 1, then continues the compiler.- Sets the items alpha to 100 before it starts fading.- It is recommended to move the item away from the scene right afterwards, because it doesn't dissolve completely to 0, despite what the description says.Makes the item's alpha fade to 0.<a href="U17xIAo.png" target="_blank">U17xIAo.png" width="306" height="35" border="0"></a>Set ColorThis trigger has yet to be programmed

<a name="aaa7"></a>ly5r5jV.png TileVarious functions (Currently only 1) for manipulating tiles can be found in the "Tile" section.CFFILYS.png Edit TilesChanges a tile(s) at a specified location.- When in a tile layer, find the coordinates of the tile you want to change. Place the new tile somewhere, highlight it, and copy it. Go back to the trigger and paste the copied tile in the "tile data:" field.- "Back Layer" checkbox: If true, alters the tiles in the back layer.Select & Copy the new tiles and Paste into the tile data and then choose the x and y (in units of tiles, from to-left)

<a name="aaa8"></a>upG81JW.png SpecialThe "Special" section includes various functions for controlling other Triggers and Platforms.sWGscgh.png Turn On TriggerEnables a specified trigger to be activated.If given the tag of a trigger, will allow the trigger to be activated (does not actually activate it).LUxhi24.png Turn Off TriggerDisables a specified trigger.If given the tag of a trigger, will prevent the trigger from being able to be activated again (Does not stop a currently running thread).vxdhhXQ.png Activate TriggerActivates a specified trigger.- Does not matter whether that trigger is "on" or "off"If given the tag of a trigger, will activate the trigger's function (regardless of if it is on/off).DMPdyWq.png Stop TriggerStops a specified trigger if it is running.If given the tag of a currently-running trigger thread, will immediately stop it.dWc9rC3.png Play PlatformSpecified platform starts moving along its path if it's not already.If given the tag of a platform not in motion, will cause platform to move (if paused/not started moving).MIqtwMv.png Pause PlatformPauses a specified platform at its current location.If given the tag of a platform in motion, will pause the platform in it's current place.o5EunU1.png Reset PlatformMoves a platform back to its starting position and pauses it.If given the tag of a platform, will reset it back to the beginning (and pauses it there).

<a name="aaa9"></a>Wn3UXZ6.png // comment"//comment" allows you to store a message in the trigger that has no effect on what the code does.Enter any desired comment here (has no effect outside level designer)."Secret" Functions:

Open Shop:

Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
llitem:6;0;0;64;64;0;1;openshop,1

Opens the shop. You can change the shop type by changing the last "1" in the code above.Shop types:

  1. Default shop
  2. Empty shop
  3. Masamune shop
  4. Lightning Rod shop
  5. Winged Boots Shop

Open Enchanter:

Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
llitem:6;0;0;64;64;0;1;openenchant

Opens the Enchanter.Set Post Filter:

Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
llitem:6;0;0;64;64;0;1;setpostfilter,0

Gives the level a permanent green tint.Semaphore V:

Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
llitem:6;0;0;64;64;0;1;v

WARNING: DOES NOT WORK. WILL CRASH GAME IF OPENED.Semaphore P

Code: <a href="#" onclick="selectCode(this); return false;">Select all</a>
llitem:6;0;0;64;64;0;1;p

WARNING: DOES NOT WORK. WILL CRASH GAME IF OPENED.


Anything we missed? Please tell us!