If you've never played chrono trigger the combat system uses a charge bar to determine when a player or enemy will attack.
This example is a very basic version of the actual chrono trigger combat system has 2 pac man actors one you the other an enemy each with their own health bar, when you or the npc's bar is full you will be allowed to attack the "Attack!" text will let you know you can attack.
Very simple and easy to understand i made it for hblade awhile back just figured it would be of better use here.