diff options
author | Jeija <norrepli@gmail.com> | 2013-01-23 18:32:02 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-03-23 23:16:29 +0100 |
commit | e1ff5b13619666e5b987ecf4faaf294400ffd979 (patch) | |
tree | 13885f396367c79625a72a4445fe6e81819d92c5 /doc | |
parent | ab57fdac44bae20e43500b3edd39bac9a0f563c5 (diff) | |
download | minetest-e1ff5b13619666e5b987ecf4faaf294400ffd979.tar.gz minetest-e1ff5b13619666e5b987ecf4faaf294400ffd979.tar.bz2 minetest-e1ff5b13619666e5b987ecf4faaf294400ffd979.zip |
Allow spawning particles from the server, from lua
Spawn single particles or make use of ParticleSpawner for many randomly spawned particles.
Accessible in Lua using minetest.spawn_particle and minetest.add_particlespawner.
Increase Protocol Version to 17.
Conflicts:
src/clientserver.h
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 3d47785ba..4edca5adb 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1028,6 +1028,37 @@ minetest.get_ban_description(ip_or_name) -> ban description (string) 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, + 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, + 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) +^ If playername is specified, only deletes on the player's client, +^ otherwise on all clients + Random: minetest.get_connected_players() -> list of ObjectRefs minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer |