- Creates a character at the coordinates point
- 009A: [var] = create_actor [int1] [int2] at [flt1] [flt2] [flt3]
- Actor.Create( [var], [int1], [int2], [flt1], [flt2], [flt3] )
- Native analog
This opcode creates a character at the coordinates point. Using this opcode requires the model to be already loaded, usually through opcode 0247, or else the game can crash. The major script editors like Sanny Builder support using the character's DFF model name and automatically converts it to the corresponding model ID number upon compilation. All characters created by this opcode outside the standard mission structure will become near-permanent in the game until opcode 01C2 is used to mark it as no longer needed or removed from the world through other means like 009B or 034F.
- See also: Spawn a ped
The following example, using Sanny Builder, will spawn a ped close to the player character.
const CHAR_MODEL = #BFORI CHAR_HANDLE = [email protected] X_POS = [email protected] Y_POS = [email protected] Z_POS = [email protected] end 0247: request_model CHAR_MODEL 038B: load_requested_models 00A0: store_actor $PLAYER_ACTOR position_to X_POS Y_POS Z_POS X_POS += 4.0 009A: CHAR_HANDLE = create_actor 4 CHAR_MODEL at X_POS Y_POS Z_POS 0249: release_model CHAR_MODEL 01C2: remove_references_to_actor CHAR_HANDLE
Special peds use models
SPECIAL##.dff, where ## is a number from 01 to 04 in GTA III, 01 to 21 in Vice City, and 01 to 10 in San Andreas. It is used in conjunction with 023C. The special character number corresponds to the number in
SPECIAL##.dff. You do not have to load
SPECIAL##.dff as it is always loaded into the game. Each special character number can accommodate only one special ped at a time and can be replaced by another special ped if the other special ped has the same number.
In the original scripts of GTA III and Vice City, every special character number is used at least once. In San Andreas, the game actively uses special character numbers 1 to 5 while the rest are not actively used in the game.
Loading special peds is similar to loading regular peds. The following example, using Sanny Builder, will spawn a special ped close to the player character.
const CHAR_HANDLE = [email protected] X_POS = [email protected] Y_POS = [email protected] Z_POS = [email protected] end 023C: load_special_actor 1 'PLAYER' // for GTA III and Vice City // 023C: load_special_actor 'ANDRE' as 1 // for San Andreas 038B: load_requested_models 00A0: store_actor $PLAYER_ACTOR position_to X_POS Y_POS Z_POS X_POS += 4.0 009A: CHAR_HANDLE = create_actor_pedtype 21 model #SPECIAL01 at X_POS Y_POS Z_POS // for GTA III and Vice City // 009A: CHAR_HANDLE = create_actor_pedtype 23 model #SPECIAL01 at X_POS Y_POS Z_POS // for San Andreas 0296: unload_special_actor 1 01C2: remove_references_to_actor CHAR_HANDLE
create, spawn, actor, ped, pedestrian, pedtype, model, character