Hi all! It's been years since I last posted here. It's great to see familiar nicks still around!
Today I bring you an embarrasingly basic scripting question.
I am trying to set up the turns of a turn-based combat system. So far I have defined the characters' and enemies' attributes in structs in the header and main script. I can import and export these between the battle room and the main screen without problems. I can also have different enemy and hero parties depending on the battle I need to run, so I feel things are coming together nicely.
But here is where I run into trouble. Each character/enemy has a speed attribute (int) which should determine the order in which he is to act. Now I am trying to automate the turns and I feel I am getting stuck in one of the easy parts of the process. I have arranged the speed attributes in an array of int values and I need to have them in descending order. Any tips?
Thanks!
Edit: I have also run several searches in the forum but I cannot seem to find what I am after.
Today I bring you an embarrasingly basic scripting question.
I am trying to set up the turns of a turn-based combat system. So far I have defined the characters' and enemies' attributes in structs in the header and main script. I can import and export these between the battle room and the main screen without problems. I can also have different enemy and hero parties depending on the battle I need to run, so I feel things are coming together nicely.
But here is where I run into trouble. Each character/enemy has a speed attribute (int) which should determine the order in which he is to act. Now I am trying to automate the turns and I feel I am getting stuck in one of the easy parts of the process. I have arranged the speed attributes in an array of int values and I need to have them in descending order. Any tips?
Thanks!
Edit: I have also run several searches in the forum but I cannot seem to find what I am after.