Fire::addExplosion: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
BOOL isAudible = If explosion makes a sound.<br>BOOL isInvisible = If the explosion is invisible or not.<br><br>this native is missing a new argument: noDamage<br>nodamage = false: damage || nodamage = true: no damage<br><br>enum ExplosionTypes<br>{<br> EXPLOSION_GRENADE,<br> EXPLOSION_GRENADELAUNCHER,<br> EXPLOSION_STICKYBOMB,<br> EXPLOSION_MOLOTOV,<br> EXPLOSION_ROCKET,<br> EXPLOSION_TANKSHELL,<br> EXPLOSION_HI_OCTANE,<br> EXPLOSION_CAR,<br> EXPLOSION_PLANE,<br> EXPLOSION_PETROL_PUMP,<br> EXPLOSION_BIKE,<br> EXPLOSION_DIR_STEAM,<br> EXPLOSION_DIR_FLAME,<br> EXPLOSION_DIR_WATER_HYDRANT,<br> EXPLOSION_DIR_GAS_CANISTER,<br> EXPLOSION_BOAT,<br> EXPLOSION_SHIP_DESTROY,<br> EXPLOSION_TRUCK,<br> EXPLOSION_BULLET,<br> EXPLOSION_SMOKEGRENADELAUNCHER,<br> EXPLOSION_SMOKEGRENADE,<br> EXPLOSION_BZGAS,<br> EXPLOSION_FLARE,<br> EXPLOSION_GAS_CANISTER,<br> EXPLOSION_EXTINGUISHER,<br> EXPLOSION_PROGRAMMABLEAR,<br> EXPLOSION_TRAIN,<br> EXPLOSION_BARREL,<br> EXPLOSION_PROPANE,<br> EXPLOSION_BLIMP,<br> EXPLOSION_DIR_FLAME_EXPLODE,<br> EXPLOSION_TANKER,<br> EXPLOSION_PLANE_ROCKET,<br> EXPLOSION_VEHICLE_BULLET,<br> EXPLOSION_GAS_TANK,<br> EXPLOSION_BIRD_CRAP<br>};
Creates an explosion at given coords.
This function is missing last argument, so you cant create explosion with damage.
__TOC__
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
 
*'''y:''' float
*'''x: <font color='green'>float'''</font>
*'''z:''' float
*'''y: <font color='green'>float'''</font>
*'''explosionType:''' int
*'''z: <font color='green'>float'''</font>
*'''damageScale:''' float
*'''explosionType: <font color='red'>int'''</font>
*'''isAudible:''' Boolean
**[[Explosions|Explosion Types]]
*'''isInvisible:''' Boolean
*'''damageScale: <font color='green'>float'''</font>
*'''cameraShake:''' float
*'''isAudible: <font color='blue'>Boolean'''</font> (Trigger explosion sound)
*'''isInvisible: <font color='blue'>Boolean'''</font> (Trigger visibility)
*'''cameraShake: <font color='green'>float'''</font>
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
 
// todo
{{ClientsideCode|
</syntaxhighlight>
<pre>
 
</pre>
}}
 
==See also==
==See also==
{{Fire_s_function_c}}
{{Fire_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 15:26, 2 October 2019

Creates an explosion at given coords. This function is missing last argument, so you cant create explosion with damage.

Syntax

mp.game.fire.addExplosion(x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);

Required Arguments

  • x: float
  • y: float
  • z: float
  • explosionType: int
  • damageScale: float
  • isAudible: Boolean (Trigger explosion sound)
  • isInvisible: Boolean (Trigger visibility)
  • cameraShake: float

Return value

  • Undefined

Example

Client-Side

See also

Template:Fire s function c