- Home /
Scripting of Character Action in simulation game
Hi Unity Community
I'm googling for some advice but it's seem no hope so I made this topic, if it's was somethings wrong please guide me.
I will use "action" and "animation" in this context:
action: something that character can do (watch tv, dancing,...)
animation: the animation clip of action.
I 'm in a simulation online mobile game project like the Sims (ofcoz simpler than sims ) and I doing the character action part of this game. Let explain my case, my character have some common action(walking, talking,...) each action have 3 state(start(start animations), loop(loop animations), end(end animations)). and during user play duration, our game will release some special action (get item to get new action...). The type of action are: action with furniture(reading book,..), with other character(maybe include fur(talking, playing video games,...)),....
I have some ideas to implement this:
Scripting the action type class to control all the animation of this action, all the animation clip timing,... then every action with that type will use that class. The advantage I found is that when I add new action I don't have to script again and this can work for long time, the big disadvantage I think is that we can't add more complicated action flexibility, and maybe hard for the animator when he create a new action.
Each action will have it's own action class, I think this is the flexible way to implement because each action will not depends on any others but every time we add new action, we have to update the application this must be a little bit uncomfortable for our users.
Which one I should use to implement or any better other ideas to implement it? Please guild me. I'm still a fresher in game development, if my idea have any illogical please alert me. Thanks for spending time read this.
Your answer
![](https://koobas.hobune.stream/wayback/20220612112302im_/https://answers.unity.com/themes/thub/images/avi.jpg)