I'm adding some voucher codes into my game and I need each code to be different. To do this I know I would need to use a for loop or for each but I've never used either of them before, so have no clue.
So far, I've set the text to 'PRZ-0001' when a particular button is clicked but I need to get the voucher code number to increase by one for each click. Therefore, the second click would set the text to 'PRZ-0002', the third click would set the text to 'PRZ-0003' and so on.
Do I need to use a for loop or for each? Do I need to use a number instance variable on the text object? What events and actions would I need to use to get this to work?