ID:169857
 
in a Final Fantasy-like Battle system...i cant get either of those systems to work for me...if anyone can explain in-depth way to get those to work for me,or can give a very in-depth tutorial or demo,that would be good... but please dont shout code fragments at me,becuase i wont understand. if i did, i wouldnt be here.
The first step is to stop and think about how the battles progress when you actually play one of the games or any game with a battle system for that matter. The battle is obviously going to be one big loop where you get commands from the players and commands are generated for whatever opponent(if it's a non-player) or you need to wait for commands from other players. The commands are executed for both sides and if both sides can still fight, it's back to step one and it's the same routine. Simple enough. Here's a little pseudo-code to help visualize the action:

   while(battle is on!)
if(PVP battle)
wait for commands from both sides
else
wait for commands from player
have a set of actions for monsters to execute

determine the turn order for all participants

Each participant gets their turn
For each player that goes, if there are enemies left to attack, do that
If there are no monsters left, then the battle is over and your players win

For each monster that goes, attack players
If all players are dead, battle is also over and you need handle what heppens
when your players are wiped out

If there are participants left on both sides, start the next turn

In response to tenkuu
That didnt make much sense to me... If i knew what to do, i would do it!
In response to Hiddeknight
That didnt make much sense to me... If i knew what to do, i would do it!

If you don't know what you are trying to do then you won't be able to program it :P. Before you try and program it write a bunch of test cases with examples of combat demonstrating what can happen in combat and in what order it happens. Then from that you can start determining what needs to be done.