added random mini crewmate colors

This commit is contained in:
Looki2000 2023-01-31 22:31:00 +01:00
parent bc21a51a77
commit 71cf78c304
2 changed files with 10 additions and 1 deletions

View File

@ -41,6 +41,7 @@ local entity = {
on_activate = function(self, staticdata) on_activate = function(self, staticdata)
local texture = textures_b[math.random(#textures_b)] local texture = textures_b[math.random(#textures_b)]
self.object:set_properties({textures = {texture}}) self.object:set_properties({textures = {texture}})
self.object:set_yaw(math.random() * 2 * math.pi) self.object:set_yaw(math.random() * 2 * math.pi)
self.rotation_direction = math.random(-1, 1) self.rotation_direction = math.random(-1, 1)
self.min_max_jump_force_diff = self.max_jump_force - self.min_jump_force self.min_max_jump_force_diff = self.max_jump_force - self.min_jump_force

View File

@ -1,3 +1,9 @@
local textures_b = {
"amogus_entity.png",
"amogus_entity_b.png",
"amogus_entity_g.png",
"amogus_entity_br.png"
}
local entity = { local entity = {
physical = true, physical = true,
@ -7,7 +13,6 @@ local entity = {
visual_size = {x=5, y=5, z=5}, visual_size = {x=5, y=5, z=5},
mesh = "amogus_entity.obj", mesh = "amogus_entity.obj",
textures = {"amogus_entity.png"},
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
minetest.chat_send_player(clicker:get_player_name(), "SO SUSSY!") minetest.chat_send_player(clicker:get_player_name(), "SO SUSSY!")
@ -73,6 +78,9 @@ local entity = {
mode = 0, -- | 0 - stand still | 1 - walk | 2 - chase | 3 - run away | 4 - rest mode | mode = 0, -- | 0 - stand still | 1 - walk | 2 - chase | 3 - run away | 4 - rest mode |
on_activate = function(self, staticdata) on_activate = function(self, staticdata)
local texture = textures_b[math.random(#textures_b)]
self.object:set_properties({textures = {texture}})
self.object:set_yaw(math.random() * 2 * math.pi) self.object:set_yaw(math.random() * 2 * math.pi)
self.rotation_direction = math.random(-1, 1) self.rotation_direction = math.random(-1, 1)
end, end,