Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
puppetmaster
Minetest
Commits
7f8c2417
Commit
7f8c2417
authored
Feb 11, 2022
by
puppetmaster
Browse files
add hud
parent
af839437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
3 deletions
+30
-3
atrapa/mods/willy/init.lua
atrapa/mods/willy/init.lua
+30
-3
No files found.
atrapa/mods/willy/init.lua
View file @
7f8c2417
total
=
0
if
mobs
.
mod
and
mobs
.
mod
==
"redo"
then
mobs
:
register_mob
(
"willy:willy"
,{
...
...
@@ -47,7 +47,9 @@ walk_chance = 0,
--Usar lazo para capturar a willy
mobs
:
capture_mob
(
self
,
clicker
,
0
,
0
,
80
,
false
,
nil
)
if
mobs
:
capture_mob
(
self
,
clicker
,
0
,
0
,
80
,
false
,
nil
)
then
change_hud
()
end
--end
...
...
@@ -62,6 +64,30 @@ walk_chance = 0,
})
minetest
.
register_on_joinplayer
(
function
(
player
)
local
my_hub3
=
player
:
hud_add
({
hud_elem_type
=
"text"
,
position
=
{
x
=
1
,
y
=
0
.
5
},
offset
=
{
x
=
-
120
,
y
=
-
25
},
text
=
"Willy Rex atrapados "
..
total
,
alignment
=
{
x
=
0
,
y
=
0
},
-- center aligned
scale
=
{
x
=
100
,
y
=
100
},
-- covered later
number
=
0xFF0000
,
})
function
change_hud
()
total
=
total
+
1
player
:
hud_change
(
my_hub3
,
"text"
,
"Willy Rex atrapados "
..
total
)
end
end
)
mobs
:
spawn
({
name
=
"willy:willy"
,
max_light
=
7
,
})
...
...
@@ -70,6 +96,7 @@ walk_chance = 0,
mobs
:
register_egg
(
"willy:willy"
,
"Willy"
,
"default_dirt.png"
,
1
)
end
Write
Preview
Markdown
is supported
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