Fire::startScriptFire: Difference between revisions

From RAGE Multiplayer Wiki
m (Replaced HTML with template)
m (Fixed two typographical errors, changed example to use clearer text labels matching the ones used by the function definition.)
Line 19: Line 19:
{{ClientsideCode|
{{ClientsideCode|
<pre>
<pre>
//Client event  
// Clientside event  
mp.events.add('StartFire', (posX, posY, posZ, maxChilderen, gasPowerd) => {
mp.events.add('StartFire', (posX, posY, posZ, maxChildren, isGasFire) => {
     // The fireId is a int
     // The fireId is a int
     let fireId = mp.game.fire.startScriptFire(posX, posY, posZ, maxChilderen, gasPowerd);
     let fireId = mp.game.fire.startScriptFire(posX, posY, posZ, maxChildren, isGasFire);
});
});
</pre>
</pre>

Revision as of 17:42, 13 November 2020

Starts a fire:

xyz: Location of fire
maxChildren: The max amount of times a fire can spread to other objects. Must be 25 or less, or the function will do nothing.
isGasFire: Whether or not the fire is powered by gasoline.

Syntax

mp.game.fire.startScriptFire(X, Y, Z, maxChildren, isGasFire);

Required Arguments

  • X: float
  • Y: float
  • Z: float
  • maxChildren: int
  • isGasFire: Boolean

Return value

  • int

Example

Client-Side
// Clientside event 
mp.events.add('StartFire', (posX, posY, posZ, maxChildren, isGasFire) => {
    // The fireId is a int
    let fireId = mp.game.fire.startScriptFire(posX, posY, posZ, maxChildren, isGasFire);
});

See also

Template:Fire s function c