This idea would work although Im not sure on where to start with it. If anyone can give me an example really quick so I get the idea I would appreciate it.
The problem with this is that it slows down combat and leaves one play sitting, potentially forever, giving each person an unlimited amount of time to take their action.
Even so, if you are bent on such a thing, I would probably add a structure allocated for a combat. Have it keep a list of characters, and have the char struct have a pointer to the combat. It should keep track of the peoples turns, possible options and various other things. Of course, thats how I would do it.
Then in the overall general scheme of the mud you keep a list of current combats, you loop through them and analyze each one, and update it if it needs updating. You would really have to figure out a way to keep things moving though.
Im looking for help on a true-type turn based combat system. I want it to be based on my agility stat. The person in the room with the highest agility will get to go first then down the list until it reaches bottom and then returns. (IE. A goes then B then A then B etc..) While A is currently taking his turn B cannot take an action. Im not sure if I can set up a for-loop(or how-to) or if i need to add a struct for it. Im lost if someone can help me with sorting the fight to get who goes first on through Id be greatly appreciated. Thank you very much.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.