Battle turns by values

Get help using Construct 2

Post » Wed Feb 19, 2014 10:14 pm

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.
B
21
S
7
G
4
Posts: 231
Reputation: 3,470

Post » Wed Feb 19, 2014 11:15 pm

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.
B
17
S
8
G
4
Posts: 461
Reputation: 6,137

Post » Thu Feb 20, 2014 2:58 am

Ah, it's really that simple. Thanks for the help, I'll try this right away.
B
21
S
7
G
4
Posts: 231
Reputation: 3,470


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 8 guests