I have one script resource per character with a function for each state in said script resource.There is also another script resource with shared common state functions that all state code can access.