0 Favourites

Problem with "Active Time Battle" RPG

  • Hello everyone!

    I'm trying to make an Active Time Battle battle system (like Final Fantasy, Child of Light, Grandia) but I'm struggling to get it work.

    In this kind of RPG there is a bar with icons representing each combatent. When a icon arrive at the end, the character can attack or use a move.

    * First I made two groups: "Player Turn" (which gives the player control to use commands) and "Guard Turn" (AI for the enemy).

    * After that, I made two objects (Player ATB and Guard ATB) with bullet behavior who moves to the right at the speed of the instance variable "Perception". When they reach another object, the corresponding group is activated.

    Everything went nice and smooth until they reached the end point at the same time. When this happens, at the same time, the enemy attacks and the player can use his attacks. I want the player to attack before the enemy or, even better, the one with more "perception" acts first.

    How can I put the group activation in order?

  • I am not quite sure if I understand what you want but use Wait X Seconds should make it work?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I'm not burning my fingers on this one..

    You might want to rethink the way you are trying to handle this issue.

    In my opinion it would be a lot easier to control if you used values instead of bullet-behaviour and overlap.

  • Many thanks for the replies!

    I am not quite sure if I understand what you want but use Wait X Seconds should make it work?

    Unfortunately not. Sorry, I think I didn't explained right.

    When the icon arrive at the end of the bar, the time should freeze to give the player the ability to choose an attack/move.

    Here is an example:

    https://youtu.be/Cl_jFpeJaz8?t=2m29s

    I'm not burning my fingers on this one..

    You might want to rethink the way you are trying to handle this issue.

    In my opinion it would be a lot easier to control if you used values instead of bullet-behaviour and overlap.

    But if I use values, wouldn't happen the same problem? How can I make the characters to act one after another, with values?

  • It would be much easier to compare..

    something like:

    If value > certain number

    -- player.perception > guard.perception

    player attack

    -- else

    guard attack

  • But if you want to keep using your original code:

    playerATB is overlapping

    -- guardATB is not overlapping

    set playerturn activated

    -- else

    -- guardATB.perception > playerATB.perception

    set guardturn activated

    --else

    -- PlayerATB.perception > guardATB.perception

    set playerturn activated

  • I think he is looking more for a timer per character.

    Just give all of them a variable countdown and active boolean, and if

    every second

    sub

    character.countdown > 0 , subtract 1 second , set character.active = false

    sub

    character.countdown = 0 , set character.active = true

    After having moved, or used an attack, set character.countdown = 10

    When they are true, you can attack / move, or the AI can attack move

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