Clopen

[Solved] Overriding Existing Stategraph State for a Character

Recommended Posts

Clopen    11
Posted (edited)

I made a new character and I'd like to override a specific state in its stategraph, but nobody else's (namely, I want to change its funnyidle animation to one of the emotes).

I managed to override it for everyone,but I don't know how to override it just for him.

I'd rather not copy Wilson's stategraph to a new file, make the modification and then assign that stategraph to him, since that would require updating when Wilson's stategraph changes.

Thanks in advance. =)

Edited by Clopen

Share this post


Link to post
Share on other sites
Eusong    121

try doing something such as

 

if inst.prefab == "yourcharactersname" then
	--do your animation
else
  	--do the normal animation
end


inside the state

Share this post


Link to post
Share on other sites
Clopen    11
Posted (edited)

Well, sure, I can do that, and yeah, it would work (thanks for the suggestion), but it doesn't feel like the right approach to me.

What if I want to add other customization?
Do I change Wilson's stategraph and test prefabs for everything?
Every character has its own stategraph; there has to be a way to alter a specific state for a specific character.

Edited by Clopen

Share this post


Link to post
Share on other sites
Ultroman    397

I think what Eusong said is all you can do, really. Problem is, if any other mod made changes to that state, you'll be overwriting them. I have never seen someone change the state for just a single instance of a prefab or a prefab that shares its stategraph. I think you need to make your own.

Share this post


Link to post
Share on other sites
Clopen    11

I see.

Well, alright then.
I'll give him a modified version of Wilson's stategraph.

Thank you both. =)

Share this post


Link to post
Share on other sites

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