How do I get object's order by variable?

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Hey, that's actually geniously simple. That could very well do the trick. No need to set any orders, either. Thank you so much!

  • You're welcome

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