Jump to content

Recommended Posts

Klei recently added this function which I believe is used by walter.

AnimState:SetHatOffset(x, y)

This function offsets the hat symbol on relevant animations.

Make sure it is called properly on the entity you want it called on.

Most entities use inst as the variable name to refer to themselves.

So inst.AnimState:SetHatOffset(x, y)

Replace x, y with offset parameters which will require trial and error to make sure it fits what you want. X should be 0 and you can focus mostly on testing y for your client.

Edited by IronHunter
  • Thanks 1
On 10/17/2022 at 12:48 AM, IronHunter said:

Klei recently added this function which I believe is used by walter.

AnimState:SetHatOffset(x, y)

This function offsets the hat symbol on relevant animations.

Make sure it is called properly on the entity you want it called on.

Most entities use inst as the variable name to refer to themselves.

So inst.AnimState:SetHatOffset(x, y)

Replace x, y with offset parameters which will require trial and error to make sure it fits what you want. X should be 0 and you can focus mostly on testing y for your client.

Thanks! 
its worked :3

Edited by HiraaCaan
  • Health 1
On 10/17/2022 at 6:48 AM, IronHunter said:

Klei recently added this function which I believe is used by walter.

AnimState:SetHatOffset(x, y)

This function offsets the hat symbol on relevant animations.

Make sure it is called properly on the entity you want it called on.

Most entities use inst as the variable name to refer to themselves.

So inst.AnimState:SetHatOffset(x, y)

Replace x, y with offset parameters which will require trial and error to make sure it fits what you want. X should be 0 and you can focus mostly on testing y for your client.

Hello, I have the same problem as OP and I stumbled onto this post. The problem is I can't seem to set the y value to a negative number. If I type in -5 for example, the "-" isn't recognized and the hat ends up going UP, when I need it to go the opposite way. I have barely any knowlegde on lua scripts so if any of you can help I'd be grateful.

image.png.d8920ced789afe2c33d97592db434f6c.png

4 hours ago, dgb0o0 said:

Hello, I have the same problem as OP and I stumbled onto this post. The problem is I can't seem to set the y value to a negative number. If I type in -5 for example, the "-" isn't recognized and the hat ends up going UP, when I need it to go the opposite way. I have barely any knowlegde on lua scripts so if any of you can help I'd be grateful.

image.png.d8920ced789afe2c33d97592db434f6c.png

Hi. In the animation engine the Y-axis is flipped. Positive number meaning lower, negative number meaning higher. If you want the hat to be lower, you'll need to put in a high number.

4 hours ago, Hornete said:

Hi. In the animation engine the Y-axis is flipped. Positive number meaning lower, negative number meaning higher. If you want the hat to be lower, you'll need to put in a high number.

Ah I didn't know that, thank you! 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...