0.2 is currently developedJordach wrote:where's the dl link? for 0.2?
[Mod] Particles Mod [0.3.1] [particles]
Code: Select all
WATERPARTICLES = {
physical = true,
collisionbox = {0,0,0,0,0,0},
visual = "sprite",
visual_size = {x=0.2, y=0.2},
textures = {"default_water.png"},
on_activate = function (self)
self.object:setvelocity({x=math.random(-1,1)*0.5, y=math.random(-1,1)*0.5, z=math.random(-1,1)*0.5})
end,
on_step = function(self, dtime)
self.timer = self.timer + dtime
if self.timer > 20 then
self.object:remove()
end
if minetest.env:get_node(self.object:getpos()).name ~= "default:water_source" then
self.object:remove()
end
end,
timer = 0,
}
minetest.register_entity("particles:water", WATERPARTICLES)
minetest.register_abm({
nodenames = {"default:water_source"},--, "default:water_flowing"},
interval = 10,
chance = 1,
action = function(pos)
if math.random(1000) == 1 then
minetest.env:add_entity({x=pos.x+math.random()*0.5,y=pos.y-0.25,z=pos.z+math.random()*0.5}, "particles:water")
end
end,
})
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
I'll maybe add thisJeija wrote:This code adds floating particles in water. What about adding this to V 0.2 of this mod? (Maybe with another texture for the particles)Code: Select all
WATERPARTICLES = { physical = true, collisionbox = {0,0,0,0,0,0}, visual = "sprite", visual_size = {x=0.2, y=0.2}, textures = {"default_water.png"}, on_activate = function (self) self.object:setvelocity({x=math.random(-1,1)*0.5, y=math.random(-1,1)*0.5, z=math.random(-1,1)*0.5}) end, on_step = function(self, dtime) self.timer = self.timer + dtime if self.timer > 20 then self.object:remove() end if minetest.env:get_node(self.object:getpos()).name ~= "default:water_source" then self.object:remove() end end, timer = 0, } minetest.register_entity("particles:water", WATERPARTICLES) minetest.register_abm({ nodenames = {"default:water_source"},--, "default:water_flowing"}, interval = 10, chance = 1, action = function(pos) if math.random(1000) == 1 then minetest.env:add_entity({x=pos.x+math.random()*0.5,y=pos.y-0.25,z=pos.z+math.random()*0.5}, "particles:water") end end, })
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
I guess the fact that it is lua instead of c++ isn't the main problem. The most important thing is that particles cannot be controlled by a server - It must be client-side only. So for now, it's good to have this mod, but don't put too much work into it, so if someone makes this in c++ it was not totally for nothing.
-
- Member
- Posts: 4534
- Joined: Mon Oct 03, 2011 17:58
- GitHub: Jordach
- IRC: Jordach
- In-game: Jordach
- Location: Blender Scene
yes, that's right, all we need now is some form of way to see if someone is digging.Jeija wrote:I guess the fact that it is lua instead of c++ isn't the main problem. The most important thing is that particles cannot be controlled by a server - It must be client-side only. So for now, it's good to have this mod, but don't put too much work into it, so if someone makes this in c++ it was not totally for nothing.
-
- Member
- Posts: 103
- Joined: Thu Feb 16, 2012 18:04
- Death Dealer
- Member
- Posts: 1379
- Joined: Wed Feb 15, 2012 18:46
- Location: Limbo
- Contact:
little bubbles in front of your face while under water would be neat:D or maybe when you first jump in
Last edited by Death Dealer on Tue Mar 20, 2012 06:21, edited 1 time in total.
Keep calm and code python^_^
- Death Dealer
- Member
- Posts: 1379
- Joined: Wed Feb 15, 2012 18:46
- Location: Limbo
- Contact:
what version are you using? and the mod folder doesnt need to be made its in the root directory somewhere.bingo009 wrote:Hey, i'm new in Minetest, and this mod didn't work. I create mods folder in data folder, and move particle folder into mods folder, and i haven't got a particle effects. I only use a Minecraft Texture Pack. What's wrong?
Last edited by Death Dealer on Mon Apr 02, 2012 15:31, edited 1 time in total.
Keep calm and code python^_^
I download minetest from this page(latest stable version, windows 7):
http://c55.me/minetest/download.php
This is my folders structure:
bin data doc world
|
mods(i place mods folders here)
http://c55.me/minetest/download.php
This is my folders structure:
bin data doc world
|
mods(i place mods folders here)
- Death Dealer
- Member
- Posts: 1379
- Joined: Wed Feb 15, 2012 18:46
- Location: Limbo
- Contact:
-
- Moderator
- Posts: 4095
- Joined: Wed Aug 24, 2011 09:44
- GitHub: sfan5
- IRC: sfan5
- Location: Germany
Update!
Changelog:
BTW for Modders: If you want Digging Particle Support for your Mod make a List with all Block and their Color
Example:
Available Colors: (List may be outdated)
Send me the List and extra Colors (if there are any) and i'll include it
Changelog:
- Big Performance Improvement (make one on_dignode callback instead of ~30 of them)
- Digging Particles support for Mesecons
BTW for Modders: If you want Digging Particle Support for your Mod make a List with all Block and their Color
Example:
Code: Select all
--== Modname ==--
{"modname:my_block1", "gray"},
{"modname:my_block2", "sandcolor"},
- black
- brown
- gray
- green
- lightgray
- red
- sandcolor
- white
- yellow
Send me the List and extra Colors (if there are any) and i'll include it
Nice!
Just had a random though looking at the code: would it be possible to have Particles Mod react to a node that belongs to a specific group? If so, define a custom group namespace in your mod and mod Devs would add that to their own mod code: instant integration without dependency.
Again, random thought not based on any actual working code reality.
Just had a random though looking at the code: would it be possible to have Particles Mod react to a node that belongs to a specific group? If so, define a custom group namespace in your mod and mod Devs would add that to their own mod code: instant integration without dependency.
Again, random thought not based on any actual working code reality.
Who is online
Users browsing this forum: No registered users and 2 guests