1
General / How to do text selecting?
« on: May 31, 2018, 03:00:45 pm »
Well, I'm not too sure how to explain this, but it's somewhat simple. I am creating an an old JRPG battle system where the player chooses to fight or flee. So far I have created the background and display the enemy sprites such in the link below.
https://i.imgur.com/Phnm83K.png
Now the part comes in where I have almost absolutely no idea where to begin: player option selection. Now, I can just hard code with a variable that counts in binary with 0 being attack and 1 being flee, but I would like my code to be dynamic in the future. For example, I would probably add more options the player can choose from later such as 'power up' option or a 'use item' option. How would I go about doing this? I've checked the GitHub wiki and tutorials, but found nothing I was looking for, unless I've just missed something. Pointers and examples are much appreciated
https://i.imgur.com/Phnm83K.png
Now the part comes in where I have almost absolutely no idea where to begin: player option selection. Now, I can just hard code with a variable that counts in binary with 0 being attack and 1 being flee, but I would like my code to be dynamic in the future. For example, I would probably add more options the player can choose from later such as 'power up' option or a 'use item' option. How would I go about doing this? I've checked the GitHub wiki and tutorials, but found nothing I was looking for, unless I've just missed something. Pointers and examples are much appreciated