Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Illuna-Minetest
mobs_monster
Commits
475e0f56
Commit
475e0f56
authored
Jun 20, 2020
by
tenplus1
Browse files
use global particle effect function for sand/lava monster
parent
44774661
Changes
2
Hide whitespace changes
Inline
Side-by-side
lava_flan.lua
View file @
475e0f56
...
...
@@ -62,21 +62,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
pos
.
y
=
pos
.
y
+
1
minetest
.
add_particlespawner
({
amount
=
40
,
time
=
0
.
25
,
minpos
=
pos
,
maxpos
=
pos
,
minvel
=
{
x
=
-
2
,
y
=
0
,
z
=
-
2
},
maxvel
=
{
x
=
2
,
y
=
2
,
z
=
2
},
minacc
=
{
x
=
0
,
y
=
0
,
z
=
0
},
maxacc
=
{
x
=
0
,
y
=
10
,
z
=
0
},
minexptime
=
0
.
1
,
maxexptime
=
1
,
minsize
=
3
.
0
,
maxsize
=
5
.
0
,
texture
=
"tnt_smoke.png"
,
})
mobs
:
effect
(
pos
,
40
,
"tnt_smoke.png"
,
3
,
5
,
2
,
0
.
5
,
nil
,
false
)
minetest
.
sound_play
(
"fire_extinguish_flame"
,
{
pos
=
pos
,
max_hear_distance
=
12
,
gain
=
1
.
5
},
true
)
...
...
@@ -91,21 +77,7 @@ mobs:register_mob("mobs_monster:lava_flan", {
minetest
.
set_node
(
pos
,
{
name
=
"fire:basic_flame"
})
end
minetest
.
add_particlespawner
({
amount
=
20
,
time
=
0
.
25
,
minpos
=
pos
,
maxpos
=
pos
,
minvel
=
{
x
=
-
2
,
y
=
-
2
,
z
=
-
2
},
maxvel
=
{
x
=
2
,
y
=
2
,
z
=
2
},
minacc
=
{
x
=
0
,
y
=
-
10
,
z
=
0
},
maxacc
=
{
x
=
0
,
y
=
-
10
,
z
=
0
},
minexptime
=
0
.
1
,
maxexptime
=
1
,
minsize
=
1
.
0
,
maxsize
=
2
.
0
,
texture
=
"fire_basic_flame.png"
,
})
mobs
:
effect
(
pos
,
40
,
"fire_basic_flame.png"
,
2
,
3
,
2
,
5
,
10
,
nil
)
self
.
object
:
remove
()
end
...
...
sand_monster.lua
View file @
475e0f56
...
...
@@ -95,9 +95,9 @@ mobs:register_mob("mobs_monster:sand_monster", {
]]
on_die
=
function
(
self
,
pos
)
pos
.
y
=
pos
.
y
+
0
.
5
effect
(
pos
,
30
,
"mobs_sand_particles.png"
,
0
.
1
,
2
,
3
,
5
)
mobs
:
effect
(
pos
,
30
,
"mobs_sand_particles.png"
,
.
1
,
2
,
3
,
5
)
pos
.
y
=
pos
.
y
+
0
.
25
effect
(
pos
,
30
,
"mobs_sand_particles.png"
,
0
.
1
,
2
,
3
,
5
)
mobs
:
effect
(
pos
,
30
,
"mobs_sand_particles.png"
,
.
1
,
2
,
3
,
5
)
end
,
--[[
on_rightclick = function(self, clicker)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment