How do I Timers turns and combat

  • Ok so i am attempting to make a turn based tactical battle system in my game.

    Right now each sprite has a timer instance variable and every tick a number is added to that variable (modified by the sprites speed), once that variable reaches a certain number (100) it is that sprites "turn".

    I can handle all of that and get that to work right but i want to know if there is a way to display the next 5 sprites in order of how filled their turn timer is and how close they are to getting the next turn?

    And then if a turn timer gets added to or subtracted to (like a spell boosting speed) have the order of displayed sprites change?

    This would require me to compare the timers of all of the different sprites and im not exactly sure how to do that.

  • Anyone?

  • One way is to use "For Each (ordered)", where the expression is the timer value.

  • Figured it out if anyone is interested ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hey I am interested in this combat system i have several project that is put on hold because i couldn't do the turn based with multiple player. Id like to know if you are done with the combat scene that Id want to see a tutorial on this and plus multiple enemy targeting. currently there isnt any thing but just single targeting and that just plain easy n dumb.

    Would be nice if you could also add in explanation on how to do Single, multiple targeting spells for both enemy and player effect.

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