How do I chose who to interact with?

0 favourites
  • 3 posts
  • Hey, guys. Well, I'm trying to make a Tactics game with grids and turns, something like Final Fantasy Tactics and Fire Emblem. I am pretty new with game engines and codding, and am having trouble with multiple interactions.

    I am using the "Line of Sight" interaction, so when the character is in the line of sight of an enemy, they enter a battle. That lead to a problem with the character battling with two enemies at the same time. Then I put an instance variable at the enemies with diferente numbers and put the character to Interact with the enemy with the lowest variable.

    I want to make the character have the option to chose the enemy to battle, not just pick one of them or both.

    Sorry for the bad english and thank you in advance!

  • It is a bit difficult to answer as it depends on how you have set up your project, and as such should provide your capx to have an accurate and adapted answer to your project.

    But pretty much, before your battle, you already know how many enemies are in line of sight and should have a step "pick enemy".

    During that step, do an interface that shows your possible enemies to the player (according to their type/instance variable and so on, again hard to answer, depends on your project), and from there allow the player to pick one. (Could be done by selecting a grid cell that is highlighted, you know the UID of the enemy that is on this cell so depending on the UID, you know what enemy is picked and can then display it in the Battle part.)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, sorry for not posting the capx. Here it is: https://drive.google.com/open?id=0BybQh ... mJBWnZidUk

    Anyway, I haven't made the highlight and there is only one character, and the enemies aren't acting yet, so it's like a turn looping. I just want to finish this interaction trouble (and the fact that I don't want the character to Interact with diagonal enemies) to start working with multiple characters and the highlight.

    So there is a way to "know" who the character is in line of sight? I haven't figured it out yet.

    Thanks again!

    P.S.: Since I am brazilian, the texts on game are portuguese, sorry for that! I can make a little "traduction" if it's needed, though.

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