Hi Everyone,
I’m working on a Candy-Crush-style game that loads most of its data from JSON. I have two teams, and I’d like to switch which range of sprite-frames is used based on a SelectTeam value:
If SelectTeam = 0, use frames [0, 1, 2, 3, 4, 5]
If SelectTeam = 1, use frames [6, 7, 8, 9, 10, 11]
What I really want is to take the original frame index (say i from 0 to 5) and map it dynamically so that when SelectTeam = 1, it becomes i + 6 (e.g. 0→6, 1→7, 2→8, etc.), and make that the new, persistent frame number at runtime. I’ve tried a few different event setups (arrays, At() expressions, setting animation frame, etc.), but none have given me a permanent mapping.
How can I best implement this in Construct 3 so that the sprite always shows the correct team’s frames? Any sample events or tips would be much appreciated—thanks in advance!