020C
Jump to navigation
Jump to search
Description
- Creates an explosion at a point
Syntax
- 020C: create_explosion [int] at [flt1] [flt2] [flt3]
Parameter
- [flt1]
- X-coordinate
- [flt2]
- Y-coordinate
- [flt3]
- Z-coordinate
- [int]
- Explosion type (see below)
This opcode creates an explosion at a coordinates point. These are real explosions so they make sounds, cause damage, and shake the camera. Different explosion types produce different sound effects and have different ranges in which the sound of the explosion can be heard. Opcode 0565 creates the same visual explosion without sounds.
Explosion types
GTA III
Type | Enum[1] | SFX[2] | Range | Used in original SCM | Notes |
---|---|---|---|---|---|
0 | EXPLOSION_ |
65 | 400.0 | ✓ | |
1 | EXPLOSION_ |
66 | 200.0 | ||
2 | EXPLOSION_ |
65 | 400.0 | ||
3 | EXPLOSION_ |
456 | 400.0 | ✓ | |
4 | EXPLOSION_ |
456 | 400.0 | Exactly the same as type 3 | |
5 | EXPLOSION_ |
456 | 400.0 | ✓ | |
6 | EXPLOSION_ |
79 | 300.0 | ||
7 | EXPLOSION_ |
65 | 400.0 | ||
8 | EXPLOSION_ |
65 | 400.0 | ||
9 | EXPLOSION_ |
79 | 300.0 |
Vice City
Type | Enum | SFX[3] | Range | Used in original SCM | Notes |
---|---|---|---|---|---|
0 | EXPLOSION_ |
48 | 200.0 | ✓ | Grenade |
1 | EXPLOSION_ |
49 | 150.0 | ✓ | Molotov Cocktail, can only explode on ground and cannot explode over water |
2 | EXPLOSION_ |
48 | 200.0 | ✓ | Rocket |
3 | EXPLOSION_ |
47 | 200.0 | Car and motorcycle | |
4 | EXPLOSION_ |
47 | 200.0 | Exactly the same as type 3 | |
5 | EXPLOSION_ |
47 | 200.0 | Exactly the same as type 3; boat | |
6 | EXPLOSION_ |
47 | 200.0 | ✓ | Final destruction of the NPC police helicopter and the NPC Dodo |
7 | EXPLOSION_ |
47 | 200.0 | Similar to type 6; midair explosion of the NPC police helicopter | |
8 | EXPLOSION_ |
59 | 200.0 | Pickup mine | |
9 | EXPLOSION_ |
48 | 200.0 | Explosive barrel | |
10 | EXPLOSION_ |
48 | 200.0 | Rhino cannon | |
11 | EXPLOSION_ |
59 | 200.0 | ✓ |
- ^ Enums whose values are used in the original script are from GTAModding.ru. The rest are inferred from Vice City's enums.
- ^ These values correspond to an SFX entry. The association between the explosion and SFX is hardcoded. The range is how far the player can be in meters before the sound diminishes. For III v1.0, the location of the array in memory starts at 0x609240.
- ^ For VC v1.0, the location of the array in memory starts at 0x6B2D4C.
San Andreas
Keywords
add, create, explosion