Difference between revisions of "020C"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
__NOTOC__
+
{{TocRight}}
{{Icon|trilogy}} '''ADD_EXPLOSION'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
'''Description'''
+
| command    = ADD_EXPLOSION
: Creates an explosion at a point
+
| description = Creates an explosion at the point
'''Syntax'''
+
| syntax1    = 020C: create_explosion [''int''] at [''flt1''] [''flt2''] [''flt3'']
: 020C: create_explosion [''int''] at [''flt1''] [''flt2''] [''flt3'']
+
| p1t        = [''flt1'']
'''Parameter'''
+
| p1d        = X-coordinate
: [''flt1'']
+
| p2t        = [''flt2'']
:: X-coordinate
+
| p2d        = Y-coordinate
: [''flt2'']
+
| p3t        = [''flt3'']
:: Y-coordinate
+
| p3d        = Z-coordinate
: [''flt3'']
+
| p4t        = [''int'']
:: Z-coordinate
+
| p4d        = Explosion mode ([[#Explosion modes|see below]])
: [''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 [[SFX|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.
+
This opcode creates an explosion at the coordinates point. These are real explosions so they make sounds, cause damage, and shake the camera. Different explosion types produce different [[SFX|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 ==
+
== Explosion modes ==
 
=== GTA III ===
 
=== GTA III ===
{| class="wikitable sortable"
+
{|class="wikitable sortable center-col-1"
! Type || Enum{{ref|1}} || SFX{{ref|2}} || Range || style="width: 4em;" | Used in original SCM || class="unsortable" | Notes
+
!Mode ||Enum{{ref|1}} ||SFX{{ref|2}} ||Range ||style="width: 4em;" |Used in original SCM ||class="unsortable" |Notes
 
|-
 
|-
| 0 || EXPLOSION_<wbr>GRENADE || 65 || 400.0 || {{a|c}} | &#x2713; ||
+
|0 ||EXPLOSION_<wbr>GRENADE ||65 ||400.0 ||{{a|c}} |&#x2713; ||
 
|-
 
|-
| 1 || EXPLOSION_<wbr>MOLOTOV || 66 || 200.0 || ||
+
|1 ||EXPLOSION_<wbr>MOLOTOV ||66 ||200.0 ||||
 
|-
 
|-
| 2 || EXPLOSION_<wbr>ROCKET || 65 || 400.0 || ||
+
|2 ||EXPLOSION_<wbr>ROCKET ||65 ||400.0 ||||
 
|-
 
|-
| 3 || EXPLOSION_<wbr>CAR || 456 || 400.0 || {{a|c}} | &#x2713; ||
+
|3 ||EXPLOSION_<wbr>CAR ||456 ||400.0 ||{{a|c}} |&#x2713; ||
 
|-
 
|-
| 4 || EXPLOSION_<wbr>CAR_<wbr>QUICK || 456 || 400.0 || || Exactly the same as type 3
+
|4 ||EXPLOSION_<wbr>CAR_<wbr>QUICK ||456 ||400.0 ||||Exactly the same as type 3
 
|-
 
|-
| 5 || EXPLOSION_<wbr>HELI || 456 || 400.0 || {{a|c}} | &#x2713; ||
+
|5 ||EXPLOSION_<wbr>HELI ||456 ||400.0 ||{{a|c}} |&#x2713; ||
 
|-
 
|-
| 6 || EXPLOSION_<wbr>MINE || 79 || 300.0 || ||
+
|6 ||EXPLOSION_<wbr>MINE ||79 ||300.0 ||||
 
|-
 
|-
| 7 || EXPLOSION_<wbr>BARREL || 65 || 400.0 || ||
+
|7 ||EXPLOSION_<wbr>BARREL ||65 ||400.0 ||||
 
|-
 
|-
| 8 || EXPLOSION_<wbr>TANK_<wbr>GRENADE || 65 || 400.0 || ||
+
|8 ||EXPLOSION_<wbr>TANK_<wbr>GRENADE ||65 ||400.0 ||||
 
|-
 
|-
| 9 || EXPLOSION_<wbr>HELI_<wbr>BOMB || 79 || 300.0 || ||
+
|9 ||EXPLOSION_<wbr>HELI_<wbr>BOMB ||79 ||300.0 ||||
 
|}
 
|}
  
 
=== Vice City ===
 
=== Vice City ===
{| class="wikitable sortable"
+
{|class="wikitable sortable center-col-1"
! Type || [[SCM_language_III/VC_definitions#EXPLOSION|Enum]] || SFX{{ref|3}} || Range || style="width: 4em;" | Used in original SCM || class="unsortable" | Notes
+
!Mode ||[[SCM language III/VC definitions#EXPLOSION|Enum]] ||SFX{{ref|3}} ||Range ||style="width: 4em;" |Used in original SCM ||class="unsortable" |Notes
 
|-
 
|-
| 0 || EXPLOSION_<wbr>GRENADE || 48 || 200.0 || {{a|c}} | &#x2713; || Grenade
+
|0 ||EXPLOSION_<wbr>GRENADE ||48 ||200.0 ||{{a|c}} |&#x2713; ||Grenade
 
|-
 
|-
| 1 || EXPLOSION_<wbr>MOLOTOV || 49 || 150.0 || {{a|c}} | &#x2713; || Molotov Cocktail, can only explode on ground and cannot explode over water
+
|1 ||EXPLOSION_<wbr>MOLOTOV ||49 ||150.0 ||{{a|c}} |&#x2713; ||Molotov Cocktail, can only explode on ground and cannot explode over water
 
|-
 
|-
| 2 || EXPLOSION_<wbr>ROCKET || 48 || 200.0 || {{a|c}} | &#x2713; || Rocket
+
|2 ||EXPLOSION_<wbr>ROCKET ||48 ||200.0 ||{{a|c}} |&#x2713; ||Rocket
 
|-
 
|-
| 3 || EXPLOSION_<wbr>CAR || 47 || 200.0 || || Car and motorcycle
+
|3 ||EXPLOSION_<wbr>CAR ||47 ||200.0 ||||Car and motorcycle
 
|-
 
|-
| 4 || EXPLOSION_<wbr>CAR_<wbr>QUICK || 47 || 200.0 || || Exactly the same as type 3
+
|4 ||EXPLOSION_<wbr>CAR_<wbr>QUICK ||47 ||200.0 ||||Exactly the same as type 3
 
|-
 
|-
| 5 || EXPLOSION_<wbr>BOAT || 47 || 200.0 || || Exactly the same as type 3; boat
+
|5 ||EXPLOSION_<wbr>BOAT ||47 ||200.0 ||||Exactly the same as type 3; boat
 
|-
 
|-
| 6 || EXPLOSION_<wbr>HELI || 47 || 200.0 || {{a|c}} | &#x2713; || Final destruction of the NPC police helicopter and the NPC Dodo
+
|6 ||EXPLOSION_<wbr>HELI ||47 ||200.0 ||{{a|c}} |&#x2713; ||Final destruction of the NPC police helicopter and the NPC Dodo
 
|-
 
|-
| 7 || EXPLOSION_<wbr>HELI2 || 47 || 200.0 || || Similar to type 6; midair explosion of the NPC police helicopter
+
|7 ||EXPLOSION_<wbr>HELI2 ||47 ||200.0 ||||Similar to type 6; midair explosion of the NPC police helicopter
 
|-
 
|-
| 8 || EXPLOSION_<wbr>MINE || 59 || 200.0 || || [[Pickup]] mine
+
|8 ||EXPLOSION_<wbr>MINE ||59 ||200.0 ||||[[Pickup]] mine
 
|-
 
|-
| 9 || EXPLOSION_<wbr>BARREL || 48 || 200.0 || || Explosive barrel
+
|9 ||EXPLOSION_<wbr>BARREL ||48 ||200.0 ||||Explosive barrel
 
|-
 
|-
| 10 || EXPLOSION_<wbr>TANK_<wbr>GRENADE || 48 || 200.0 || || Rhino cannon
+
|10 ||EXPLOSION_<wbr>TANK_<wbr>GRENADE ||48 ||200.0 ||||Rhino cannon
 
|-
 
|-
| 11 || EXPLOSION_<wbr>HELI_<wbr>BOMB || 59 || 200.0 || {{a|c}} | &#x2713; ||
+
|11 ||EXPLOSION_<wbr>HELI_<wbr>BOMB ||59 ||200.0 ||{{a|c}} |&#x2713; ||
 
|}
 
|}
  
Line 79: Line 78:
 
=== San Andreas ===
 
=== San Andreas ===
 
* [http://gtag.gtagaming.com/sanandreas/explosions/ List at GTAG Modding]
 
* [http://gtag.gtagaming.com/sanandreas/explosions/ List at GTAG Modding]
 +
 +
== Example ==
 +
:''See [[0136#Example]]''
  
 
== Keywords ==
 
== Keywords ==
 
add, create, explosion
 
add, create, explosion
 
[[Category:OpCodes]]
 

Latest revision as of 15:06, 15 January 2017

GTA III Vice City San Andreas ADD_EXPLOSION


Description
Creates an explosion at the point
Syntax
020C: create_explosion [int] at [flt1] [flt2] [flt3]
Parameter
[flt1]
X-coordinate
[flt2]
Y-coordinate
[flt3]
Z-coordinate
[int]
Explosion mode (see below)

This opcode creates an explosion at the 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 modes

GTA III

Mode Enum[1] SFX[2] Range Used in original SCM Notes
0 EXPLOSION_GRENADE 65 400.0
1 EXPLOSION_MOLOTOV 66 200.0
2 EXPLOSION_ROCKET 65 400.0
3 EXPLOSION_CAR 456 400.0
4 EXPLOSION_CAR_QUICK 456 400.0 Exactly the same as type 3
5 EXPLOSION_HELI 456 400.0
6 EXPLOSION_MINE 79 300.0
7 EXPLOSION_BARREL 65 400.0
8 EXPLOSION_TANK_GRENADE 65 400.0
9 EXPLOSION_HELI_BOMB 79 300.0

Vice City

Mode Enum SFX[3] Range Used in original SCM Notes
0 EXPLOSION_GRENADE 48 200.0 Grenade
1 EXPLOSION_MOLOTOV 49 150.0 Molotov Cocktail, can only explode on ground and cannot explode over water
2 EXPLOSION_ROCKET 48 200.0 Rocket
3 EXPLOSION_CAR 47 200.0 Car and motorcycle
4 EXPLOSION_CAR_QUICK 47 200.0 Exactly the same as type 3
5 EXPLOSION_BOAT 47 200.0 Exactly the same as type 3; boat
6 EXPLOSION_HELI 47 200.0 Final destruction of the NPC police helicopter and the NPC Dodo
7 EXPLOSION_HELI2 47 200.0 Similar to type 6; midair explosion of the NPC police helicopter
8 EXPLOSION_MINE 59 200.0 Pickup mine
9 EXPLOSION_BARREL 48 200.0 Explosive barrel
10 EXPLOSION_TANK_GRENADE 48 200.0 Rhino cannon
11 EXPLOSION_HELI_BOMB 59 200.0
  1. ^ Enums whose values are used in the original script are from GTAModding.ru. The rest are inferred from Vice City's enums.
  2. ^ 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.
  3. ^ For VC v1.0, the location of the array in memory starts at 0x6B2D4C.

San Andreas

Example

See 0136#Example

Keywords

add, create, explosion