23 lines
548 B
Lua
23 lines
548 B
Lua
local Dummy = {
|
|
initial_properties = {
|
|
hp_max = 20,
|
|
physical = true,
|
|
visual = "upright_sprite",
|
|
collide_with_objects = false,
|
|
textures = {"player.png", "player_back.png"},
|
|
visual_size = {x = 1, y = 2},
|
|
nametag = "Dummy\nThis is not a human",
|
|
automatic_rotate = 15,
|
|
}
|
|
}
|
|
|
|
function Dummy:on_rightclick(clicker)
|
|
self.object:set_velocity({x = 0, y = 10, z = 0})
|
|
end
|
|
|
|
function Dummy:on_step(dtime)
|
|
self.object:add_velocity({x = 0, y = -1 * dtime, z = 0})
|
|
end
|
|
|
|
minetest.register_entity("pyutest_core:dummy", Dummy)
|