diff options
author | khonkhortisan <khonkhortisan@gmail.com> | 2013-04-22 11:35:10 -0700 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-01-13 17:34:56 -0500 |
commit | 2b1eff772524fca8249fd64028e5cbfeabc127a0 (patch) | |
tree | f7d1a231de13db304a2ea1fb945e41b08b38f0f1 /doc | |
parent | a4c5f10ecf4fd49cfbf73580b00c0b4f12ee40cf (diff) | |
download | minetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.tar.gz minetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.tar.bz2 minetest-2b1eff772524fca8249fd64028e5cbfeabc127a0.zip |
Allow vertical axis particle rotation constraint
Use tables for adding particles, deprecate former way.
separate particles(pawner) definition, add default values, work with no
arguments
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 69 |
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 +} |