Problem with "Active Time Battle" RPG

Get help using Construct 2

Post » Fri May 15, 2015 3:42 am

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.

Image

* 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.

Image

Image

Image

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?
B
7
S
2
G
1
Posts: 13
Reputation: 1,101

Post » Fri May 15, 2015 8:06 am

I am not quite sure if I understand what you want but use Wait X Seconds should make it work?
B
12
S
3
Posts: 211
Reputation: 1,477

Post » Fri May 15, 2015 8:32 am

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.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue May 19, 2015 11:07 am

Many thanks for the replies!

Fireche wrote: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


LittleStain wrote: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?
B
7
S
2
G
1
Posts: 13
Reputation: 1,101

Post » Tue May 19, 2015 11:13 am

It would be much easier to compare..
something like:

If value > certain number
-- player.perception > guard.perception
> player attack
-- else
> guard attack
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue May 19, 2015 11:27 am

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 told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue May 19, 2015 11:35 am

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
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u and 25 guests