Commit 7f8c2417 authored by puppetmaster's avatar puppetmaster
Browse files

add hud

parent af839437
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment