Battle turns by values

  • I decided to challenge myself and recreate a very jrpg-esque battle system in C2 in the ways of old Final Fantasies and such. Now I'm wondering how I should the character turns handled. Each character, player and enemy has a Speed stat which decides the order in which they all act. After player has issued the commands the game should "line them up" so it knows who acts and when. By lining them up I mean somehow count each entity's Speed and call their actions in order.

    Could arrays work for this? Any ideas would be welcome.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If, on every Character Object you have a variable "Speed", then you can use the System event "Pick by comparison", or "Pick lowest/highest". This will let you select the one with the highest speed, and with a "flag" variable, saying if he has already played or not.

    Here, this is what the events would look like.

    This should all be put in a function you would call "next Character activation", or something like that, as you sure will need to wait for the player to choose an action before going to the next character.

  • Ah, it's really that simple. Thanks for the help, I'll try this right away.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)