createExplosion
Client-side
Server-side
Shared
This page is incomplete! Help wanted!
Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.
Creates an explosion of a certain type at a specified point in the world. If creator is specified, the explosion will occur only in its dimension.
Syntax
createExplosion ( )Code Examples
server
Example 1:This code will create an explosion at the player's position when they spawn.
function explosionOnSpawn ( ) -- get the spawned player's position local pX, pY, pZ = getElementPosition ( source ) -- and create an explosion there, making him the creator createExplosion ( pX, pY, pZ, 6, source )end-- add this function as a handler for any player that spawnsaddEventHandler ( "onPlayerSpawn", root, explosionOnSpawn )