<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.trainzsimulator.com/index.php?action=history&amp;feed=atom&amp;title=HowTo%2FExample_Station_Script</id>
	<title>HowTo/Example Station Script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.trainzsimulator.com/index.php?action=history&amp;feed=atom&amp;title=HowTo%2FExample_Station_Script"/>
	<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Example_Station_Script&amp;action=history"/>
	<updated>2026-11-05T05:35:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Example_Station_Script&amp;diff=15835&amp;oldid=prev</id>
		<title>S301 at 12:23, 2 August 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Example_Station_Script&amp;diff=15835&amp;oldid=prev"/>
		<updated>2018-08-02T12:23:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:23, 2 August 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l68&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;Return to [[HowTo/Build Passenger Enabled Assets]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;;Return to [[HowTo/Build Passenger Enabled Assets]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:How-to_guides|HowTo Guides]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>S301</name></author>
	</entry>
	<entry>
		<id>https://wiki.trainzsimulator.com/index.php?title=HowTo/Example_Station_Script&amp;diff=3429&amp;oldid=prev</id>
		<title>Pev: Created page with &quot;This is the Station.gs script for the example station asset:   include &quot;GenericPassengerStation.gs&quot;       class Station isclass GenericPassengerStation  {       bool TriggerSu...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.trainzsimulator.com/index.php?title=HowTo/Example_Station_Script&amp;diff=3429&amp;oldid=prev"/>
		<updated>2012-08-16T01:35:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This is the Station.gs script for the example station asset:   include &amp;quot;GenericPassengerStation.gs&amp;quot;       class Station isclass GenericPassengerStation  {       bool TriggerSu...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is the Station.gs script for the example station asset:&lt;br /&gt;
&lt;br /&gt;
 include &amp;quot;GenericPassengerStation.gs&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
 class Station isclass GenericPassengerStation&lt;br /&gt;
 {&lt;br /&gt;
  &lt;br /&gt;
   bool TriggerSupportsMassStoppedLoad(Vehicle vehicle, string triggerName)&lt;br /&gt;
   {&lt;br /&gt;
     bool vehicleToTrain = vehicle.GetFacingRelativeToTrain();&lt;br /&gt;
  &lt;br /&gt;
     if (triggerName == &amp;quot;trigger_track_0_a&amp;quot; or triggerName == &amp;quot;trigger_track_0_e&amp;quot;)&lt;br /&gt;
     {&lt;br /&gt;
       int direction = vehicle.GetRelationToTrack(me, &amp;quot;track_0&amp;quot;);&lt;br /&gt;
       if (!vehicleToTrain)&lt;br /&gt;
               direction = -direction;&lt;br /&gt;
   &lt;br /&gt;
       if (direction == Vehicle.DIRECTION_BACKWARD and triggerName == &amp;quot;trigger_track_0_e&amp;quot;)&lt;br /&gt;
         return true;&lt;br /&gt;
    &lt;br /&gt;
       if (direction == Vehicle.DIRECTION_FORWARD and triggerName == &amp;quot;trigger_track_0_a&amp;quot;)&lt;br /&gt;
         return true;&lt;br /&gt;
      }&lt;br /&gt;
   &lt;br /&gt;
     if (triggerName == &amp;quot;trigger_track_0_a&amp;quot; or triggerName == &amp;quot;trigger_track_0_b&amp;quot; or triggerName == &amp;quot;trigger_track_0_c&amp;quot; or triggerName == &amp;quot;trigger_track_0_d&amp;quot; or triggerName == &amp;quot;trigger_track_0_e&amp;quot;)&lt;br /&gt;
     {&lt;br /&gt;
       if (vehicle.GetMyTrain().IsStopped())&lt;br /&gt;
         return true;&lt;br /&gt;
     }&lt;br /&gt;
  &lt;br /&gt;
     return false;&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
    void GetTrackAndSide(Vehicle vehicle, string triggerName, TrackLoadInfo retInfo)&lt;br /&gt;
     {&lt;br /&gt;
     if (triggerName == &amp;quot;trigger_track_0_a&amp;quot; or triggerName == &amp;quot;trigger_track_0_b&amp;quot; or triggerName == &amp;quot;trigger_track_0_c&amp;quot; or triggerName == &amp;quot;trigger_track_0_d&amp;quot; or triggerName == &amp;quot;trigger_track_0_e&amp;quot;)&lt;br /&gt;
     {&lt;br /&gt;
       retInfo.trackName = &amp;quot;track_0&amp;quot;;&lt;br /&gt;
 			retInfo.trainLeftSide = ((vehicle.GetRelationToTrack(me, retInfo.trackName) != Vehicle.DIRECTION_FORWARD) == vehicle.GetDirectionRelativeToTrain());&lt;br /&gt;
 			retInfo.platformIndex = 0;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
    public void Init(void)&lt;br /&gt;
    {&lt;br /&gt;
      inherited();&lt;br /&gt;
  		&lt;br /&gt;
         InitPassengerStation(1);&lt;br /&gt;
     		&lt;br /&gt;
      StationMain();&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
   &lt;br /&gt;
    public void AppendDriverDestinations(string[] destNames, string[] destTracks)&lt;br /&gt;
    {&lt;br /&gt;
      StringTable stringTable = GetAsset().GetStringTable();&lt;br /&gt;
   &lt;br /&gt;
      destNames[destNames.size()] = stringTable.GetString(&amp;quot;brickstation_platform1&amp;quot;);&lt;br /&gt;
      destTracks[destTracks.size()] = &amp;quot;track_0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
   	&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
;Check compiled for TS12 using &amp;quot;TrainzUtil.exe&amp;quot; for TS12.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Return to [[HowTo/Build Passenger Enabled Assets]]&lt;/div&gt;</summary>
		<author><name>Pev</name></author>
	</entry>
</feed>