I’m trying to expand on the code from the old RPG course. I would like to swap out an element from the Special Abilities Array for a new one. For instance, Self Heal lvl 1 (SH_L1) for Self Heal lvl 2 (SH_L2). However, I have no idea on how to get this one started. Any suggestions?
Here’s the array code:
void AttachInitialAbilities()
{
for (int abilityIndex = 0; abilityIndex < abilities.Length; abilityIndex++)
{
abilities[abilityIndex].AttachAbilityTo(gameObject);
}
}
I know how to setup the trigger to start the swap, I just don’t know enough about Array’s to make the swap. Any help would be appreciated. I’ve done some research on the topic but I haven’t found a good example to work from yet.
Thanks!