Characters in GTA 2 Mission Scripts
To create characters for your missions, you need to use the following code. PLAYER_PED
must be used initially to create the actual player, whilst CHAR_DATA
is used to create AI charcters:
PLAYER_PED name = (X,Y,Z) remap rotation
So, an example could be:
PLAYER_PED p1 = (127.5,127.5,2.0) 22 0
The following is used for AI charcters:
CHAR_DATA name = (X,Y,Z) remap rotation OCCUPATION
Again, an example could be:
CHAR_DATA bigbossdude = (12.5,57.5,4.0) 12 270 CRIMINAL_TYPE1
The characters above will stand still. They run away if a gun is fired. The next section will first detail remaps and then how to add AI to them.
Remaps
Below is a list of every remap in GTA 2 from special police officers to ordinary civilians:
0 | Blue Police |
---|---|
1 | Green Police |
2 | Red Police |
3 | Yellow Police |
4 | Army |
5 | Red hair Redneck |
6 | Blonde hair Redneck |
7 | Scientist |
8 | Zaibatsu |
9 | Krishna |
10 | Russian |
11 | Loony |
12 | Elvis |
13 | Yakuza |
14 | Fireman |
15 | Green Shorts Ped |
16 | Medic |
17 | Mugger Remap |
18 | Blue Dummy Remap |
19 | Light Blue Dummy Remap |
20 | T-Shirt & Shorts Dummy Remap |
21 | Short Sleeved Shirt & Trousers Dummy Remap |
22 | Prison Uniform |
23 | Hulk (Normal) |
24 | Hulk (Green) |
25 | Default Player Ped |
26 | Naked Dummy |
27 | Blue shirt and jeans |
28 | White shirt and jeans |
29 | Lilac shirt and jeans |
30 | Light red shirt and jeans |
31 | Light red shirt and khaki shorts |
32 | Blue shirt and blue shorts |
33 | Yellow shirt and khaki shorts |
34 | Light purple shirt and jeans |
35 | Dark red shirt and turquoise trousers |
36 | Dark green shirt and dark green trousers |
37 | Brown shirt and jeans |
38 | Brown shirt and brown trousers |
39 | Dark purple shirt and brown trousers |
40 | Dark purple shirt and light brown trousers |
41 | Burgundy shirt and light brown trousers |
42 | Short sleeve burgundy shirt and light brown trousers |
43 | Short sleeve light burgundy shirt and light brown trousers |
44 | Aqua shirt and jeans |
45 | Yellow shirt and jeans |
46 | Short sleeve dark green shirt and lilac trousers |
47 | Light grey shirt and dark grey jeans |
48 | Short sleeve grey/blue shirt and drak grey jeans |
49 | Short sleeve light purple shirt and light grey trousers |
50 | Purple shirt with light purple sleeves and light grey trousers |
51 | Grey/green shirt and grey trousers |
52 | Pink shirt and jeans |
Changing Remaps
If you’ve played on the second city with one of the Redneck missions where you enter the prison, you actually change outfit. This is a simple command:
CHANGE_CHAR_REMAP (name, remap)
Example code:
CHANGE_CHAR_REMAP (p1, 13)
To make your character or player look like a civilian, just use the following code instead:
SET_CHAR_GRAPHIC_TYPE (name, GRAPHIC_TYPE, remap)
Be careful with this command, as it sets the remap colour as well as the graphic type! Character name is self explanitory.
DUMMY_GRAPHIC | Standard peds. See the remap list above. |
---|---|
EMERG_GRAPHIC | Medics, cops and SWAT! |
GANG_GRAPHIC | Slightly bigger than standard peds. Carries a backpack. |
So an example could be:
SET_CHAR_GRAPHIC_TYPE (dummy01, DUMMY_GRAPHIC, 34)
This also applies to things like medics and police so they look like the ones in game, and not larger version of them! The gang one shouldn’t really be used at all, as I’m pretty sure all characters have this as default.
SWAT Officer Remap
This was one of my best finds in GTA 2, and not even Rockstar or anyone else had used this in any major mission:
SET_CHAR_GRAPHIC_TYPE (p1, EMERG_GRAPHIC, -1)
Cars also use -1
for their default remap. If you try -1
with each GRAPHIC_TYPE
, you’ll get these results:
DUMMY_GRAPHIC | Roadblock tank driver (dark red shirt and green sleeves) |
---|---|
EMERG_GRAPHIC | SWAT character |
GANG_GRAPHIC | Zaibatsu |
(Originally written by Chris “Pyro” Hockley and formatted by Ben “Cerbera” Millard with full permission.)