Creating a subway (GTA2)

From WikiGTA - The Complete Grand Theft Auto Walkthrough
Jump to: navigation, search

Main Page > GTA2 > Modding Tutorial > Creating a subway


The subway in GTA2 is created with the track, several different types of zones and a few commands in the script. Plan your level carefully from the start when you want to add a subway, to prevent problems when you want to add the track and stations later.

Contents

Track

First of all, we need a track. Each style file has a set of rail tiles which are "electrocuted", which means peds will die if they walk on them. You don't necessarily have to use these tiles to create the track, but it is the most logical. In wil.sty, the tiles are 226 and 332. The last one can be made flat.

Paste a stretch of track tiles to create the track. Mark them as "field" and add green arrows in the direction the trains should travel. In block type mode, the track should look like this:

A double track in block type mode.

Corners

Tracks have to be a complete circle, so we need to make corners. Corners are made in the same way as roads, but they have to be covered. GTA2 cannot depict rotating train cars. Also, make sure the train has enough room to rotate: there should be an empty ring of at least one block around each corner. S-turns, like the one shown below, are not possible.

A corner. The selection shows how much room the train needs to rotate.
This S-turn is not possible.

Slopes

Maybe you want to use elevated tracks, which means you need slopes in the track. Like with corners, GTA2 cannot depict descending and ascending trains, so sloping tracks should be covered. To make the slope as small as possible, it is best to use the steepest slope. If you want to raise the track more than one block, you should leave one level block between the two slopes. See the example below.

A descending track. The selection shows how much room is needed. Note the level block between the slopes.

Stations

Each track needs at least one station (because trains start at a station). Make sure each train has enough room to stop at the station. The platform has to be long enough to support each passenger car at the very least. Passenger cars are two blocks long.

Zones

The tricky part of creating a subway is the placement of zones. Each station needs four different zones: A Railway Station(Platform), Railway Stop Point, Railway Station Entry Point en een Railway Exit Point. It is very important to position these zones correctly. One faulty zone can cause the whole subway to malfunction.

Railway Station(Platform)

The Railway Station(Platform) creates the platform: the area where travvelers will wait for the train. The zone should be positioned directly next to the track (not on it!). It may not be more than 1 block wide, the length depends on the length of the station. The zone doesn't have to cover the whole platform: only the part you want pedestrians to wait.

Railway Stop Point

The Railway Stop Point is a zone of 1 x 1 block and is placed on the exact location the train cab should stop. This zone should be placed so the passenger cars come to a halt next to the Railway Station(Platform) zone.

Railway Station Entry Point

The Railway Station Entry Point is a zone of 1 x 1 block and is placed on the exact location the train should slow down before entering the station.

Railway Station Exit Point

The Railway Station Exit Point is a zone of 1 x 1 block and is placed on the exact location the train should go to full speed after leaving the station.

Naming the zones

Each zone needs an unique name. Use the next code:

Examples

The placement of the zones of the first station of the first track.

The four zones of the first station of the first track have the following names:

trak00
trak00st
trak00en
trak00ex 


The four zones of the fourth station of the second track have the following names:


trak13
trak13st
trak13en
trak13ex 

Scripting the trains

Trains are created in the script with the next command:

SET_STATION_INFO ( platform , passenger_cars , trailer_cars , box_cars ) 
platform The name of the Railway Station(Platform) zone of the station where the train should be created at the start of the game. It is possible to create more trains on one track, but leave an empty station between the two trains.
passenger_cars The number of passenger cars. Each train needs at least one passenger car.
trailer_cars The number of trailer cars. Set this to 0 if you don't want the train to have trailers.
box_cars The number of box cars. Set this to 0 if you don't want the train to have box cars.

Every station where no trains start will need the next command:

SET_STATION_INFO ( platform , NO_TRAIN ) 

Furthermore, it's important to block all tunnels with a TUNNEL_BLOCKER, to prevent anything but trains from getting into the tunnel.

OBJ_DATA naam = ( X.x , Y.y , Z.z ) 0 TUNNEL_BLOCKER

These commands go before LEVELSTART

Notes

Frequently encountered problems

Modding tutorials of Grand Theft Auto 2
Mapping Map Editor · Buildings · Roads · Water & animations · Slopes · Flat tiles · Collision info · Level edge · Zones · Putting a level ingame
Scripting Declarering: Main script · Script Compiler · Code lists · Commands · Vehicles · Objects · Sounds · Characters
Programming: IF · WHILE · COUNTERs · Subroutines · THREAD TRIGGERs · Kill Frenzies
Both Manual · Lighting · Car shops · Cranes & crushers · Gangs · Subway · Multiplayer levels
File types .gci · .gmp · .gxt · .mis · .mmp · .scr · .seq · .tmp · .sty
Other Texting · Physics · Creating vehicles · Terminology · Installing levels


Navigation
Grand Theft Auto's
In other languages
Advertisement
·