Discuss Scratch

c0r_eee
Scratcher
5 posts

Help with CTB (Conditional Turn Based Battle system)

I'm making a project that mimics Final Fantasy X's battle system, the CTB system. I have the general idea down, but cannot implement it. My idea is to put the stat (agility in this case) that decides whose turn it is into a list that then compares each value.
So, see it this way. This would be a list containing each agility stat.

Player = 128
Enemy Clone 1 = 129
Enemy Clone 2 = 125
Enemy Clone 3 = 128

After comparing each, the turn order should be Enemy Clone 1, then Player, then Enemy Clone 3, and lastly Enemy Clone 2. Ties in stats award the turn to the player. After comparing, a variable named TURN will assign whoever's turn it is based on the highest number. The problem is that I'm having trouble with the clones. I do not want to make multiple sprites, so I want to be able to use clones in each spot. Anyways, I cannot decide whose turn it is because I can't say exactly which stat goes to which clone. So, on my list, it is just numbers with no enemy or player attached to the stat. So, overall, I need help applying individual stats to each clone, then, based on those stats, make whoever has the highest stat have their turn. Everything else, I can handle.
10goto10
Scratcher
1000+ posts

Help with CTB (Conditional Turn Based Battle system)

Looks like you could store the list in the order of the clone id.

The Scratch Team has a small example of using cloneID’s. https://scratch.mit.edu/projects/1184917851/

Powered by DjangoBB