Hello guys, I’m currently working on a project that consist in “brewing potions”.
Here is the idea: We have four elements (fire, water, air and earth), we need 3 of this 4 elements to brew a potion, so the player must make a combination of 3 elements, no matter what order to make a potion.
But here is the deal, to make a good visual effect we want to make that every element button pressed, will add a visual effect on the potion, if the player press fire (for example) the potion will be 1/3 filled with a red liquid, then if he press earth button it will be 1/3 red liquid and 1/3 brown liquid. If you got the idea we will need to make 19 combinations and to script it will be quite frustrating.
Should I use If in every statement like:
if (firePressed )
//Change the potion image to be the one with 1/3 fileld with red liquid.
if (firePressed && earthPressed)
//change the potion image to be the one with 1/3 filled with red liquid 1/3 filled with brown liquid
and so on…
than i repeat this one million times or is there another way to do this? (I know there is, I just don’t know to do it!)
thanks in advance, happy coding.
