Gangs in GTA 2 Mission Scripts
The cities in GTA 2 have three gangs who try to battle for the city, and they hate each other. Below is how to set up a gang in your city.
To start with, go into your map (via the editor) and add a gang zone. It is not allowed to touch any of the edges otherwise it’ll say it’s an invalid zone. So, make it one cell from the edge. Call it whatever name you like. In this example, I’ll call them zaibgang and copgang.
In your script file, the command has these parameters:
SET_GANG_INFO (gang_name,remap, BASIC_WEAPON,ANGRY_WEAPON,HATE_WEAPON, arrow_colour,X,Y,Z, respect, MODEL,car_remap)
Here’s an example:
SET_GANG_INFO (copgang,0, PISTOL,SHOTGUN,MACHINE_GUN, 4,12.5,6.5,2.0, 1, COPCAR,-1)
Do this for all your gangs. It’s a very long command and takes some explaining!
gang_name
| Must match the gang zone names in your .gmp map file.
|
|---|---|
car_remap
| Colour of the gang members. |
BASIC_WEAPON
| For killing other gangs’ members if they don’t like you (one or two bars). |
ANGRY_WEAPON
| When you have butchered quite a few of them |
HATE_WEAPON
| The gang really hates the player! This is when the bar is flashing on the negative side. |
arrow_colour
| Colour of their arrow (further down page). |
X,Y,Z
| Direct the player to one of their phones for info or something. |
respect
| How much the bar changes when the player kills a gang member. Usually set to 1.
|
MODEL
| The name of a vehicle they use as a gang car. |
car_remap
| The colour of the gang car. |
| Value | Arrow | Icon |
|---|---|---|
1
| ||
2
| ||
3
| ||
4
| ||
5
| ||
6
| ||
7
|
AI Interactions
Now, when you load up your map, you have the two gangs. But they don’t do anything do they? This is where you need to set the kill reaction. Add this just below your gang info:
SET_GANG_KILL_REACTION (firstgang, secondgang, value)
The firstgang and secondgang are for two of your created gangs. So, in my example, my code would look like this:
SET_GANG_KILL_REACTION (zaibgang, copgang, 1)
SET_GANG_KILL_REACTION (copgang, zaibgang, 1)
What this means is that copgang hates zaibgang and when the player shoots a zaibgang, respect from the copgang goes up by one. The second gang in the line hates the first gang in the line. So the first line means copgang hates zaibgang, and the second line is zaibgang hate copgang.
Sounds confusing, try it and see what happens
Gang Cars
If you want gang cars driving around, you have to do a MAP_ZONE command (before the LEVELSTART command). Below is an example:
MAP_ZONE City01 = (1000,350,200,0, 1000,100,100,100,700,0, 450)
If you check out page 22 of the scripting document, it tells you about what each value is.
Redneck Gang
The Redneck gang is a special gang in GTA 2 due to the fact they have red-haired and blonde-haired people walking around and part of the same gang. To make it work, just use the following code:
SET_GANG_INFO (madgang, 5, SHOTGUN,SHOTGUN,SHOTGUN, 0,0.0,0.0,0.0, 0, PICKUP,-1)
John Tooray discovered only one line is needed. No other gang has this feature.
(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)