diff --git a/models/stone_giant.b3d b/models/stone_giant.b3d new file mode 100644 index 0000000..3ab2493 Binary files /dev/null and b/models/stone_giant.b3d differ diff --git a/stone_giant.lua b/stone_giant.lua new file mode 100644 index 0000000..a995182 --- /dev/null +++ b/stone_giant.lua @@ -0,0 +1,69 @@ + +-- +-- stone giant entity AI script +-- + +local stone_giant_script = { + -- the start driver. Should be able to spawn a mob with a different driver! + driver = "roam", + -- default properties + properties = { + speed = 0.666, + hp_max = 20, + habitatnodes = { + "group:stone", + "group:cracky", + "default:sand" + ,} + }, + -- defined animation sets: + -- "name" = { animationspec1, animationspec2, animationspec3 .. } + -- each must be present -> 'nil' required + -- last animation should have 'frame_loop = true' + --FIXME handle repeats (running animation 5x ?) + animations = { + move = { + {{x = 216, y = 240}, frame_speed = 24, frame_loop = false}, + {{x = 240, y = 320}, frame_speed = 24, frame_loop = true}, + }, + idle = { + {{x = 120, y = 216}, frame_speed = 24, frame_loop = true}, + }, + punch = { + {{x = 329, y = 367}, frame_speed = 24, frame_loop = false}, + }, + smash = { + {{x = 367, y = 420}, frame_speed = 24, frame_loop = false}, + }, + death = { + {{x = 420, y = 453}, frame_speed = 24, frame_loop = false}, + }, + }, + -- sound samples + sounds = { + }, + -- mob script states: + roam = { + finders = { + "find_habitat", + }, + factors = {}, + }, + idle = { + factors = {}, + }, + death = { + sounds = { + start = "hurt", + }, + }, +} + +entity_ai.register_entity("entity_ai:stone_giant", { + script = stone_giant_script, + mesh = "stone_giant.b3d", + textures = {"stone_giant.png"}, + makes_footstep_sound = true, + collisionbox = {-1/2, -1/2, -1/2, 1/2, 1, 1/2}, +}) + diff --git a/textures/stone_giant.png b/textures/stone_giant.png new file mode 100644 index 0000000..4e282f6 Binary files /dev/null and b/textures/stone_giant.png differ