I have been prototyping an RPG Party System whereby you have several characters and can TAB between them.
The camera pans smoothly to whichever character is selected and has a smooth lag effect when the character moves (I can also employ the Screen Shake effect later, as I'm using Scroll-to).
I first created this without any Arrays or Families and it worked perfectly, but I would like to make it more flexible to future-proof it for changing Party sizes when members join and leave (or die).
I also have future steps planned such as a loop to fill the array, but I'm trying to take baby steps here
I haven't used arrays in construct before and don't seem to be having much luck. My array is simply 3 X values: 0, 1 & 2 (a 3x1x1 array).
X0 stores the UID of Char1, X1 stores the UID of Char2 & X2 stores the UID of Char3.
I increment the Global number PlayerSelected to allow me to select different X values within my array (which in turn should refer to the different Characters, allowing me to cycle through them).
I seem to succeed in everything up to (and including) unpinning the Player Controller from the current Character, but once I increment to the next Character, the Player doesn't want to move over there and be pinned to it, he just wanders off and leaves the first character behind.
Here is my initial setup:
Here is how I handled the Character cycling previously, which worked as intended:
Here is how I am trying to handle it now, using the same logic as before:
Here is the capx:
I am planning to turn this into a tutorial once I'm finished and any help would be appreciated