aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt69
1 files changed, 53 insertions, 16 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index 47232ae16..1fae0ebbf 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1462,30 +1462,20 @@ minetest.ban_player(name) -> ban a player
minetest.unban_player_or_ip(name) -> unban player or IP address
Particles:
-minetest.add_particle(pos, velocity, acceleration, expirationtime,
+minetest.add_particle(particle definition)
+^ Deprecated: minetest.add_particle(pos, velocity, acceleration, expirationtime,
size, collisiondetection, texture, playername)
-^ Spawn particle at pos with velocity and acceleration
-^ Disappears after expirationtime seconds
-^ collisiondetection: if true collides with physical objects
-^ Uses texture (string)
-^ Playername is optional, if specified spawns particle only on the player's client
-minetest.add_particlespawner(amount, time,
+minetest.add_particlespawner(particlespawner definition)
+^ Add a particlespawner, an object that spawns an amount of particles over time seconds
+^ Returns an id
+^ Deprecated: minetest.add_particlespawner(amount, time,
minpos, maxpos,
minvel, maxvel,
minacc, maxacc,
minexptime, maxexptime,
minsize, maxsize,
collisiondetection, texture, playername)
-^ Add a particlespawner, an object that spawns an amount of particles over time seconds
-^ The particle's properties are random values in between the boundings:
-^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
-^ minsize/maxsize, minexptime/maxexptime (expirationtime)
-^ collisiondetection: if true uses collisiondetection
-^ Uses texture (string)
-^ Playername is optional, if specified spawns particle only on the player's client
-^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
-^ Returns and id
minetest.delete_particlespawner(id, player)
^ Delete ParticleSpawner with id (return value from add_particlespawner)
@@ -2443,3 +2433,50 @@ HUD Definition (hud_add, hud_get)
offset = {x=0, y=0},
^ See "HUD Element Types"
}
+
+Particle definition (add_particle)
+{
+ pos = {x=0, y=0, z=0},
+ velocity = {x=0, y=0, z=0},
+ acceleration = {x=0, y=0, z=0},
+ ^ Spawn particle at pos with velocity and acceleration
+ expirationtime = 1,
+ ^ Disappears after expirationtime seconds
+ size = 1,
+ collisiondetection = false,
+ ^ collisiondetection: if true collides with physical objects
+ vertical = false,
+ ^ vertical: if true faces player using y axis only
+ texture = "image.png",
+ ^ Uses texture (string)
+ playername = "singleplayer"
+ ^ Playername is optional, if specified spawns particle only on the player's client
+}
+
+Particlespawner definition (add_particlespawner)
+{
+ amount = 1,
+ time = 1,
+ ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
+ 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,
+ ^ The particle's properties are random values in between the boundings:
+ ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
+ ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
+ collisiondetection = false,
+ ^ collisiondetection: if true uses collisiondetection
+ vertical = false,
+ ^ vertical: if true faces player using y axis only
+ texture = "image.png",
+ ^ Uses texture (string)
+ playername = "singleplayer"
+ ^ Playername is optional, if specified spawns particle only on the player's client
+}