added random sounds and some little changes (little as you, little sussy baka)
This commit is contained in:
@@ -12,12 +12,19 @@ local entity = {
|
||||
on_rightclick = function(self, clicker)
|
||||
minetest.chat_send_player(clicker:get_player_name(), "SO SUSSY!")
|
||||
|
||||
minetest.sound_play("amogus_sound", {
|
||||
pos = self.object:get_pos(),
|
||||
gain = 1.0,
|
||||
max_hear_distance = 5,
|
||||
pitch = 2
|
||||
})
|
||||
--minetest.sound_play("amogus_sound", {
|
||||
-- pos = self.object:get_pos(),
|
||||
-- gain = 1.0,
|
||||
-- max_hear_distance = 5,
|
||||
-- pitch = 2
|
||||
--})
|
||||
amogus_general.play_random_sound(
|
||||
"amogus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
2 -- pitch
|
||||
)
|
||||
end,
|
||||
|
||||
-- mini crewmate config --
|
||||
@@ -35,8 +42,8 @@ local entity = {
|
||||
rotation_friction = 0.9, -- the same but for rotation
|
||||
|
||||
|
||||
largest_distance_to_find_player = 6, -- largest distance to find player
|
||||
smallest_distance_to_lost_player = 10, -- smallest distance to lost player
|
||||
largest_distance_to_find_player = 8, -- largest distance to find player
|
||||
smallest_distance_to_lost_player = 12, -- smallest distance to lost player
|
||||
|
||||
largest_distance_to_stand_still = 3, -- largest distance to stand still next to the player
|
||||
|
||||
@@ -97,20 +104,26 @@ local entity = {
|
||||
|
||||
|
||||
if math.random(sound_propability) == 1 then
|
||||
minetest.sound_play("amogus_sound", {
|
||||
pos = self.object:get_pos(),
|
||||
gain = 1.0,
|
||||
max_hear_distance = 50,
|
||||
pitch = sound_pitch
|
||||
})
|
||||
--minetest.sound_play("amogus_sound", {
|
||||
-- pos = self.object:get_pos(),
|
||||
-- gain = 1.0,
|
||||
-- max_hear_distance = 50,
|
||||
-- pitch = sound_pitch
|
||||
--})
|
||||
|
||||
amogus_general.play_random_sound(
|
||||
"amogus_sound",
|
||||
self.object:get_pos(),
|
||||
1.0, -- gain
|
||||
40, -- max_hear_distance
|
||||
sound_pitch -- pitch
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
|
||||
-- if on singpleplayer mode or only one player is connected, calculate distance between player and mini crewmate
|
||||
if minetest.is_singleplayer() or #minetest.get_connected_players() == 1 then
|
||||
minetest.chat_send_all("singleplayer or multiplayer with only one player")
|
||||
|
||||
-- get first player
|
||||
self.player = minetest.get_connected_players()[1]
|
||||
|
||||
@@ -120,7 +133,6 @@ local entity = {
|
||||
self.distance = vector.length(self.crewmate_player_vector)
|
||||
-- if on multiplayer mode, calculate distance between nearest player and mini crewmate
|
||||
else
|
||||
minetest.chat_send_all("multiplayer")
|
||||
self.player = minetest.get_connected_players()
|
||||
|
||||
self.distance = nil
|
||||
|
||||
Reference in New Issue
Block a user