How do I get object's order by variable?

Get help using Construct 2

Post » Mon Feb 29, 2016 8:03 am

So basically I'm experimenting with the good ol JRPG turn-based combat idea. Now in my battle each combatant, player and enemy object, are in set into the same Family. Their speed variable is different on each object and after I've set their commands they should act in the order from highest to lowest speed. Fastest goes first, plays animation, then the second fastest etc. until the cast has all done their thing. How should I make the system pick the objects in order like this?

The best system I thought would be to give the family an 'order' variable that numerizes the objects after first checking each of their speed. It would make calling the objects easier during the actual part of acting out their commands. But I don't know how to do that.

Help?
B
21
S
7
G
4
Posts: 231
Reputation: 3,470

Post » Mon Feb 29, 2016 8:32 am

You could use the Pick Highest event, and add a Variable to them called IsAllowedToFight, toggling it to false after their turn, and toggling it to true after the enemies turn.
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Mon Feb 29, 2016 2:50 pm

Hey, that's actually geniously simple. That could very well do the trick. No need to set any orders, either. Thank you so much!
B
21
S
7
G
4
Posts: 231
Reputation: 3,470

Post » Tue Mar 01, 2016 4:09 am

You're welcome :)
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699


Return to How do I....?

Who is online

Users browsing this forum: marc254, Yahoo [Bot] and 6 guests