From 5694ab896f9072b2e16854a04018aa2df061d53b Mon Sep 17 00:00:00 2001 From: NullBite Date: Tue, 15 Mar 2022 23:00:06 -0400 Subject: [PATCH] change expression modifier to use timer function --- script.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/script.lua b/script.lua index fa74f11..cf1b6a9 100644 --- a/script.lua +++ b/script.lua @@ -14,7 +14,6 @@ armor_enabled=true function player_init() old_health=player.getHealth() end -expr_cooldown=0 -- Parts -- HEAD=model.Head.Head @@ -43,7 +42,7 @@ function changeExpression(_damage, _expression, ticks) end HEAD.setUV(getExprUV(damage,expression)) - expr_cooldown=ticks + wait(ticks, resetExpression()) end function setExpression(damage, expression) face_damage=damage @@ -115,14 +114,6 @@ end -- Tick function -- function tick() - -- expression reset spaghetti code -- - if expr_cooldown > 0 then - expr_cooldown = expr_cooldown-1 - if expr_cooldown <= 0 then - resetExpression() - end - end - -- optimization, only execute these once a second -- if world.getTimeOfDay() % 20 then -- if face is cracked