minetest.add_particlespawner

From Minetest Developer Wiki
Jump to: navigation, search

Contents

Syntax

minetest.add_particlespawner(particlespawner_definition)

Description

Add a particlespawner, an object that spawns an amount of particles over time.

Parameters

1: List containing 16 items:

amount number amount of particles
time number particle spawner stops after <time> seconds, use 0 for infinite lifespan
minpos vector minimal position
maxpos vector maximal position
minvel vector minimal velocity
maxvel vector maximal velocity
minacc vector minimal acceleration
maxacc vector maximal acceleration
minexptime number minimal expiration time
maxexptime number maximal exploration time
minsize number minimal particle size
maxsize number maximal particle size
colissiondetection boolean if true particles collide with solid blocks, if false they do not
vertical boolean limit particles to vertical axis only (useful for rain)
texture string particle texture
playername optional string spawn particles only for client

Example

minetest.add_particlespawner({
	amount = 1,
	time = 1,
	minpos = {x=0, y=0, z=0},
	maxpos = {x=0, y=0, z=0},
	minvel = {x=0, y=0, z=0},
	maxvel = {x=0, y=0, z=0},
	minacc = {x=0, y=0, z=0},
	maxacc = {x=0, y=0, z=0},
	minexptime = 1,
	maxexptime = 1,
	minsize = 1,
	maxsize = 1,
	collisiondetection = false,
	vertical = false,
	texture = "image.png",
	playername = "singleplayer"
})
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox