Body of stone giant.
This commit is contained in:
parent
6dbb4c354a
commit
58904df071
BIN
models/stone_giant.b3d
Normal file
BIN
models/stone_giant.b3d
Normal file
Binary file not shown.
69
stone_giant.lua
Normal file
69
stone_giant.lua
Normal file
@ -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},
|
||||||
|
})
|
||||||
|
|
BIN
textures/stone_giant.png
Normal file
BIN
textures/stone_giant.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 633 B |
Loading…
x
Reference in New Issue
Block a user