Does Construct 2 allow for the ability to write expressions in this fashion?
Variable PCurrentHP
Value Slot = 1 ? PlayerPokemon.At(S1, 4) :
Slot = 2 ? PlayerPokemon.At(S2, 4) :
Slot = 3 ? PlayerPokemon.At(S3, 4) :
Slot = 4 ? PlayerPokemon.At(S4, 4) :
Slot = 5 ? PlayerPokemon.At(S6, 4) :
Slot = 6 ? PlayerPokemon.At(S6, 4) : 0
It's supposed to check which Pokemon the player has active and load a saved current HP from the Pokemon's corresponding array.
I have similar functions for each stat, however some are more complicated and involve algorithms to determine stats (MaxHP for example involves a long formula utilizing level and BaseHP among other variables).
I only ask this because I'm not being given any particular errors, but I don't think that it is functioning correctly and I can't tell if that's coming from the way I've set up the expression, or from some other faulty programming.