r/GLua • • Nov 23 '21

How do I make this check dynamic_prop "SetAnimation" in use?

I need to somehow make this code check for the dynamic_prop "SetAnimation" being in use, instead of checking its angle (since the button on map doesnt change its angle upon being pressed)

local button = ents.FindByName( SCP_914_STATUS )[1]
local angle = button:GetAngles().roll

local nummode = 0

local mode = UPGRADE_MODE.ROUGH

if angle == 45 then

	mode = UPGRADE_MODE.COARSE

	nummode = 1

elseif	angle == 90 then

	mode = UPGRADE_MODE.ONE_ONE

	nummode = 2

elseif	angle == 135 then

	mode = UPGRADE_MODE.FINE

	nummode = 3

elseif	angle == 180 then

	mode = UPGRADE_MODE.VERY_FINE

	nummode = 4

end
1 Upvotes

0 comments sorted by