- Home /
Character Selection
I'm developing a game that uses different characters, with a similar kind of function to goat simulator, the characters all have base movement and abilities. But all of them have special moves which differ a lot.
Currently I'm using a main object with movement scripts, then using a selected character int as an index for selecting character meshes in children, and particles etc. I've just started trying to use scriptable objects for setting player stats, but I'm not sure how to 'index' which scriptable objects to use. I don't really want to use a switch or ifs. Another problem is that I'm using local multiplayer so I can't use one scriptable object for both players. As it 'attaches' to an object to invoke the appropriate function from the matching ability script on the character.
What I don't know if whether to have the characters as separate objects with the movement scripts, etc., as well as a script for the abilities. Though I'm not sure again how to 'index' the characters, not wanting to write a couple hundred lines with a switch statement.
Or have one big object like I have now.
I don't really have much experience as a beginner, so it would really help if you could help or point me in the right direction.
Also I do have 'numbers' for each character, from the selection screen and being used right now for choosing which child mesh to activate.
Don't know where you are at but you can take a look at this example. https://unity3d.com/learn/tutorials/topics/scripting/character-select-system-scriptable-objects
It doesn't have multiplayer but if you can figure that out, I'm sure you get the point :D
Your answer
Follow this Question
Related Questions
Link GUIText to a prefab? 2 Answers
How to Instantiate a GameObject from a ScriptableObject piece of script? 0 Answers
Multiple Cars not working 1 Answer