How do I Timers turns and combat

Get help using Construct 2

Post » Tue Jun 28, 2016 11:11 am

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.
B
23
S
11
G
4
Posts: 69
Reputation: 3,439

Post » Tue Jun 28, 2016 2:49 pm

Anyone? :(
B
23
S
11
G
4
Posts: 69
Reputation: 3,439

Post » Tue Jun 28, 2016 3:20 pm

One way is to use "For Each (ordered)", where the expression is the timer value.
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Tue Jun 28, 2016 11:54 pm

Figured it out if anyone is interested

https://www.dropbox.com/s/cvevojqh7m5ci ... .capx?dl=0
B
23
S
11
G
4
Posts: 69
Reputation: 3,439

Post » Wed Jun 29, 2016 4:29 am

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.
B
52
S
24
G
6
Posts: 391
Reputation: 7,845


Return to How do I....?

Who is online

Users browsing this forum: Ashley, Bootfit, mcscooter, TRMG and 30 guests