How do I chose who to interact with?

Get help using Construct 2

Post » Tue May 09, 2017 3:21 am

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!
B
6
S
2
G
1
Posts: 2
Reputation: 954

Post » Tue May 09, 2017 9:48 am

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.)
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,332
Reputation: 71,306

Post » Tue May 09, 2017 4:30 pm

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.
B
6
S
2
G
1
Posts: 2
Reputation: 954


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests