#Look for an actor with the highest value between all actors on map

1 messages · Page 1 of 1 (latest)

stray crater
#

So im trying to do an initiative system for turn based combat and while i managed to make the tyrns themselves im struggling in making it so when a character's turn ends, the next to go is the one with the highest initative (ie if the first chaarcter has initiative of 5, the next to go is the one with initative 3., and then the one with 1)

(By extension you could also say this could help with checking between who has the highest or lowest value between all actors on the map, but for the sake of the question i wanna focus on initiative for now)

jade summit
#

Use arrays

#

And config tables

stray crater
stray crater
# jade summit Use arrays

Im such an idiot i thought when you insert an object it literally replaces the object in that position, i now realize it just adds it instead of replacing😭

#

Ill see if i can now check for the turn thing

stray crater
#

<@&1050648858243379231> i admit im struggling. While i can see why arrays are the way, im struggling with making it so the array checks between the values (as in check for the second highest initative after the first's turn ends)

stray crater
#

I FINALLY DID IT!