GTAGames.nl advertentie

Creating car shops (GTA2)

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

Main Page > GTA2 > Modding Tutorial > Creating car shops


Car shops like Max Paynt and Smith & Heston's are very easy to add to your level.

Building

First, you need to map a building to place the car shops in. You could copypaste one of the original levels, or design your own building. Keep in mind that the building has to be covered, to mask the fact cars suddenly change color. Also remember to make your car shops recognisable, so players can find them.

In this tutorial we simply copy an original car shop. Open one of the districts, select a car shop and press CTRL + C, open your own map and press CTRL + V to paste the building wherever you want. You can move the building by selecting it and press ALT + arrow keys, Q or A. Make sure there's enough room for the road lanes. Your building will look like this:

Road lanes
Car shop

Scripting car shops

We now have a building for our car shops, but naturally nothing happens when we drive through it. The actual car shops are created with the the OBJ_DATA command in the script. Open your script and add the following command in the declare part of the script:

OBJ_DATA name = ( X.x , Y.y , Z.z ) 0 CAR_SHOP shop_type 
Name An unique name
( X.x , Y.y , Z.z ) Coordinates
0 The rotation. Just set this to '0' because shops shouldn't be rotated.
shop_type Which car shop you want to create. There are four codes: MACHINEGUN_SHOP, BOMB_SHOP, MINES_SHOP and OILSLICK_SHOP. The fifth shop, the spray shop, has no code. You create a spray shop by adding the value of the color here.

Example

To create a Smith & Heston's at 178, 163, 2, a Gold Mines at 180, 163, 2, a black Max Paynt at 182, 163, 2, a Hell Oil at 184, 163, 2 and a Red Army Surplus at 186, 163, 2, the code will look like this:

OBJ_DATA machinegunshopa = ( 178.5 , 163.5 , 2.0 ) 0 CAR_SHOP MACHINEGUN_SHOP
OBJ_DATA minesshopa = ( 180.5 , 163.5 , 2.0 ) 0 CAR_SHOP MINES_SHOP
OBJ_DATA sprayshopa = ( 182.5 , 163.5 , 2.0 ) 0 CAR_SHOP 2
OBJ_DATA oilslickshopa = ( 184.5 , 163.5 , 2.0 ) 0 CAR_SHOP OILSLICK_SHOP
OBJ_DATA bombshopa = ( 186.5 , 163.5 , 2.0 ) 0 CAR_SHOP BOMB_SHOP 
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