added random sounds and some little changes (little as you, little sussy baka)
This commit is contained in:
@@ -3,8 +3,8 @@ local textures_b = {
|
||||
"amogus_entity_b.png",
|
||||
"amogus_entity_g.png",
|
||||
"amogus_entity_br.png"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
local entity = {
|
||||
physical = true,
|
||||
collisionbox = {-0.5, 0, -0.5, 0.5, 1, 0.5},
|
||||
@@ -44,9 +44,6 @@ local entity = {
|
||||
self.object:set_yaw(math.random() * 2 * math.pi)
|
||||
self.rotation_direction = math.random(-1, 1)
|
||||
self.min_max_jump_force_diff = self.max_jump_force - self.min_jump_force
|
||||
|
||||
-- kill itself (debugging)
|
||||
--self.object:remove()
|
||||
end,
|
||||
|
||||
|
||||
@@ -54,16 +51,22 @@ local entity = {
|
||||
|
||||
-- play amogus sound randomly
|
||||
if math.random(400) == 1 then
|
||||
minetest.sound_play("amogus_sound", {
|
||||
pos = self.object:get_pos(),
|
||||
gain = 1.0,
|
||||
max_hear_distance = 50
|
||||
})
|
||||
--minetest.sound_play("amogus_sound", {
|
||||
-- pos = self.object:get_pos(),
|
||||
-- gain = 1.0,
|
||||
-- max_hear_distance = 50
|
||||
--})
|
||||
|
||||
amogus_general.play_random_sound(
|
||||
"amogus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
1.0 -- pitch
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
-- random changing between walking and standing still
|
||||
if math.random(200) == 1 then
|
||||
self.is_going_forward = not self.is_going_forward
|
||||
@@ -96,7 +99,6 @@ local entity = {
|
||||
else
|
||||
self.rotation_direction = 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- update rotation_velocity
|
||||
@@ -148,4 +150,5 @@ local entity = {
|
||||
self.last_y_velocity = vel.y
|
||||
end
|
||||
}
|
||||
|
||||
minetest.register_entity("amogus_entities:amogus", entity)
|
||||
Reference in New Issue
Block a user