Jump to content

Recommended Posts

Hello, pretty simple question here, what does AnimState:SetFinalOffset(num) do exactly? I notice it on a lot of prefabs, mostly FX prefabs. I tried applying it to my own but noticed no difference in anything.

Edited by TheSkylarr
On 11/25/2021 at 3:02 AM, TheSkylarr said:

Hello, pretty simple question here, what does AnimState:SetFinalOffset(num) do exactly? I notice it on a lot of prefabs, mostly FX prefabs. I tried applying it to my own but noticed no difference in anything.

From the patch notes of 458469 with Wes' character rework it says "AnimState:SetFinalOffset() now takes a range of -7 to 7".

Since these values are small and capped, I would imagine this determines the z-layer rendering order.  So for example you want some FX drawing to be behind something else you would set its z-layer to be more negative; more positive being closer to the screen.

You can see it in action in alterguardian_hat_equipped prefab:

	inst.AnimState:Hide(is_front and "back" or "front")
	inst.AnimState:SetFinalOffset(is_front and 1 or -1)

 

  • Thanks 2

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...