Fire::addExplosion: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 3: Line 3:
==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 ===
Line 10: Line 11:
*'''z: <font color='green'>float'''</font>
*'''z: <font color='green'>float'''</font>
*'''explosionType: <font color='red'>int'''</font>
*'''explosionType: <font color='red'>int'''</font>
**[[Explosions|Explosion Types]]
*'''damageScale: <font color='green'>float'''</font>
*'''damageScale: <font color='green'>float'''</font>
*'''isAudible: <font color='blue'>Boolean'''</font> (Trigger explosion sound)
*'''isAudible: <font color='blue'>Boolean'''</font> (Trigger explosion sound)

Revision as of 22:12, 28 September 2018

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

let playerPos = mp.players.local.position;
// Creates a grenade explosion infront of the player.
mp.game.fire.addExplosion(playerPos.x + 3, playerPos.y + 3, playerPos.z, 0, 0, true, false, 0.5);

See also

Template:Fire s function c