Hello!
Info:
C#
In the game I’m making I have a database filled with arrays like the script below. When my character is set to for example “Chosen_character = 1”, it will load all ints etc below.
If it is 1, it would load 25 health, 5 stam, 4 str, 3 armor etc.
[HideInInspector]public int[] base_health = new int[6] {0,25,25,25,25,25};
[HideInInspector]public int[] base_max_health = new int[6] {0,25,25,25,25,25};
[HideInInspector]public int[] base_stamina = new int[6] {0,5,4,3,6,2};
[HideInInspector]public int[] base_strength = new int[6] {0,4,3,3,2,5};
[HideInInspector]public int[] base_armor = new int[6] {0,3,4,5,3,5};
[HideInInspector]public int[] level = new int[6] {0,1,1,1,1,1};
My Question:
The character should be able to load the animator controller I create for the characters.
Lets say I have one animator controller for “pig1” and one for “human1”.
“pig1” is character 1 = Chosen_character = 1.
“human1” is character 2 = Chosen_character = 2.
If I set “Chosen_Character = 1” it should load the pig1 animator → What would be a good way to make this? I tried to use override but didn’t manage to make it work, not sure if it should be used for this either.
Any topics, links or such that I should read is very welcome, I ain’t here trying to make someone solve it for me! I just want a little push forward as I’m kind of stuck. I want to understand and learn, but I don’t always get the examples from the manual so I’m trying the forum.
Cheers!