Need help with the battle system I'm writing

● ARCHIVED · READ-ONLY
Started by Poppie360 8 posts View original ↗
  1. So I'm making my own battle system, there are two teams, yours and the enemies. there is one event that is responsible for setting which turn it is, and each turn has its own event. the even that checks which turn it is supposed to go is turned on by one switch. each turn event has their own unique switch so they know which one of them knows when they should go, however, they are told to go when a single switch is turned on. every turn the event that checks turns has to check who goes.

    each party has three people max, if the person is down their turn is skipped.

    If the player goes down the battle is lost, if all enemies are taken down the battle is won.

    (i am planning on doing this in a map but I don't know if it would be better for it to be done in a plugin, either way, I would appreciate any help.)

    f26c631a13b26fb781a038169b3d6dea.png
  2. And what are you asking for help with?
  3. Aloe Guvner said:
    And what are you asking for help with?
    i cannot figure out how to make the event that checks turns to be able to switch to the correct turn based on whose next (player, ally 1, ally , enemy 1, enemy 2, enemy 3) based on how many members there are in each party, both enemy and player, and if the person in the battle is down. I've tried a few things but I haven't gotten it to work yet.

    1ccd1cea2fd27693a6c8eff813c7bb7f.png
    (this was my last attempt, the event is pretty long)
  4. You should use loops and variables and a few switches, not conditional branches and switches for everything.
    For more help we need a logical diagram of how your battlelogic is structured.
  5. Andar said:
    You should use loops and variables and a few switches, not conditional branches and switches for everything.
    For more help we need a logical diagram of how your battlelogic is structured.
    i actually have that: https://docs.google.com/drawings/d/1YycwR5fdZG_pgfEOl7nx3CcSBjmDmTfwh_O5JsPOiVo/edit?usp=sharing

    Edit : how should i go about using a loop and variables? i have been having a hard time figuring out how i would go about figuring out who's turn would be next based on who's down and who's next in line.
  6. I was thinking that I could do a thing where the battle system at the end of each turn who would go next (as in the event itself) however I do not think that would work. if anyone has any suggestions please let me know, I've been stuck on this bit for months.
  7. Andar said:
    You should use loops and variables and a few switches, not conditional branches and switches for everything.
    For more help we need a logical diagram of how your battlelogic is structured.
    You were right, i got some help from a friend and they suggested a method that was on that train of logic, it was what i was trying to do but made so much more complicated by over thinking it.

    0dd27e0bae342f1910860337a1f1ef2d.png
    it works perfectly now and is much cleaner than before.

    (i guess the thread can be closed now.)
  8. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.