Page 1 of 1

Is possible disable the tail swipe/smacking using lua ?

Posted: Fri Mar 25, 2022 2:08 pm
by AirShip
the title.

Re: Is possible disable the tail swipe/smacking using lua ?

Posted: Fri Mar 25, 2022 7:14 pm
by deice
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.

Re: Is possible disable the tail swipe/smacking using lua ?

Posted: Fri Mar 25, 2022 10:18 pm
by AirShip
deice wrote:
Fri Mar 25, 2022 7:14 pm
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.
works perfectly fine, thanks!