the following code seems to work for me:
Code: Select all
function onTick()
if(not player.keys.down) then
player:mem(0x164, FIELD_WORD, -1)
else
player:mem(0x164, FIELD_WORD, 0)
end
end
the reason for the check is that setting the tail timer to a negative value causes the player to be unable to duck (thanks redigit), so if they are ducking you have to set it to a non-negative one.