StatiZkyZ

Villager
Member
Joined
Oct 25, 2019
Messages
11
Reaction score
0
First Language
Indonesian
Primarily Uses
RMVXA
I'm trying to make a move where the enemy will use it when it's health get low, but they'll need 5 turns before they can use it. The game will also remind the player every turn on how many turns remain before the attack will be used

However, I'm not entirely sure how to do that. So far I tried to make a battle event where if the enemy's HP has 20% health or less, it'll enter into a state and get a variable with the value of 5 (The 5 turns countdown), like so.

1611804026185.png

Then, on every turn if the enemy has the "Countdown" state, it'll reduce the variable by 1

1611804119688.png

Now, I hit a problem trying to make the game display how many turns there are left. Tried to use a chain of conditional branches like this... (Excuse my... really inefficient way of doing this)
1611804268894.png

...but the game doesn't seem to do so. The text supposedly displaying the countdown never appeared. Does this mean the variable never got subtracted?
 

Mystic_Enigma

A shadow keeping itself together...
Veteran
Joined
Mar 7, 2018
Messages
311
Reaction score
1,572
First Language
English
Primarily Uses
RMMV
It's possible that the Variable at the start is at a value other than what you needed to be. I noticed that the change is set to +5. Try changing it to =5 instead, so that it remains constant.

Then the Countdown itself is set up in a way that will not work as you desire. Instead of having the Conditionals branch into each other with Else calls, make each change to the countdown separate, without Else calls.
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
15
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
I'm trying to make a move where the enemy will use it when it's health get low, but they'll need 5 turns before they can use it. The game will also remind the player every turn on how many turns remain before the attack will be used

However, I'm not entirely sure how to do that. So far I tried to make a battle event where if the enemy's HP has 20% health or less, it'll enter into a state and get a variable with the value of 5 (The 5 turns countdown), like so.

View attachment 177257

Then, on every turn if the enemy has the "Countdown" state, it'll reduce the variable by 1

View attachment 177258

Now, I hit a problem trying to make the game display how many turns there are left. Tried to use a chain of conditional branches like this... (Excuse my... really inefficient way of doing this)
View attachment 177260

...but the game doesn't seem to do so. The text supposedly displaying the countdown never appeared. Does this mean the variable never got subtracted?
I just realized you haven't do a "Show Text" to display the countdown again on that function.

When you do so, you should change
"Countdown to self destruct in : 5!"
into
"Countdown to self destruct in : \v[7]!" (7 is the countdown variable that you use in that screenshot, change it anyway you like)

So it always shows the Countdown Variable.
 

StatiZkyZ

Villager
Member
Joined
Oct 25, 2019
Messages
11
Reaction score
0
First Language
Indonesian
Primarily Uses
RMVXA
It's possible that the Variable at the start is at a value other than what you needed to be. I noticed that the change is set to +5. Try changing it to =5 instead, so that it remains constant.

Then the Countdown itself is set up in a way that will not work as you desire. Instead of having the Conditionals branch into each other with Else calls, make each change to the countdown separate, without Else calls.
Ah, I did use =5 at first, but I might've accidentally changed it, oops.

So, do I use a condition branch to check the variable value at all, or I'll just do the check with separate battle events?

I just realized you haven't do a "Show Text" to display the countdown again on that function.

When you do so, you should change
"Countdown to self destruct in : 5!"
into
"Countdown to self destruct in : \v[7]!" (7 is the countdown variable that you use in that screenshot, change it anyway you like)

So it always shows the Countdown Variable.
The \v[n] works, thanks~

What do you mean with the "Show Text", though? The countdown after 5 still doesn't appear, is that what I'm missing?
 

Mystic_Enigma

A shadow keeping itself together...
Veteran
Joined
Mar 7, 2018
Messages
311
Reaction score
1,572
First Language
English
Primarily Uses
RMMV
Ah, I did use =5 at first, but I might've accidentally changed it, oops.

So, do I use a condition branch to check the variable value at all, or I'll just do the check with separate battle events?


The \v[n] works, thanks~

What do you mean with the "Show Text", though? The countdown after 5 still doesn't appear, is that what I'm missing?

You have the Conditional calls right, but the screenshot shows them "chained" to each other. That means a single conditions will check if the variable is at a certain value before calling the next one. But because the variable is made to change each turn, the next count will never happen.

Instead, have multiple conditionals (Without Else calls) individually, for each stage of the countdown, on the same page, that way they won't be dependent on each other.
 

Zelgadis85

IGMC 17/18 Entrant
Veteran
Joined
Mar 13, 2012
Messages
86
Reaction score
196
First Language
Finnish
Primarily Uses
RMMZ
I think there's no need for a third page, just put this in the second one and you should be ok:
(Sorry if the exact syntax is off, I haven't got VXA installed right now)

Conditional Branch: [1. Enemy] is [Countdown] Inflicted
Control Variables: [0007:Countdown] -= 1
Conditional Branch: Variable [0007:Countdown] > 0
Text: -, -, Normal, Bottom
: : Countdown to self destruct: \V[7]!
: Else
Text: -, -, Normal, Bottom
: : Commencing self destruction sequence...
Comment: Just do whatever you need here (deal damage and apply knockout to the enemy, I guess?
: Branch End
:Branch End
 

StatiZkyZ

Villager
Member
Joined
Oct 25, 2019
Messages
11
Reaction score
0
First Language
Indonesian
Primarily Uses
RMVXA
Ok, it turns out that the battle event that supposed to display the countdown (The third page on my original post) never seem to start. I used a switch on the first page

1611882924636.png

...and use it as a condition on the second page

1611883053165.png
(Note I mixed the second and third page on my original post per Zelgadis' suggestion)
The countdown is actually displayed and the 'Self destruct attack' actually happened.

One last thing though. On the turn that the countdown is supposed to start, it'll count down from 5 first, but it'll immediately go down to 4 at the same turn instead of doing it on the next turn. Any way to remedy that?
 

knocz06

Curious Rabbit
Member
Joined
Jun 28, 2020
Messages
15
Reaction score
3
First Language
Indonesian
Primarily Uses
RMMV
Ah, I did use =5 at first, but I might've accidentally changed it, oops.

So, do I use a condition branch to check the variable value at all, or I'll just do the check with separate battle events?


The \v[n] works, thanks~

What do you mean with the "Show Text", though? The countdown after 5 still doesn't appear, is that what I'm missing?
Oh my, sorry, it seems that my internet sucks. I didn't see the third screenshot because it didn't load yesterday! x,D (but oh well, ignore the show text thing, sorry)

And also you're welcome :)
 

Latest Threads

Latest Profile Posts

SF_People1_2 added!
index.php

Ami
--- Minimum Requirement ---

M.Knight: Phew...finally,i got the New Game. Let's check the Requirement
"Minimum Requirement:
  • 2.00 Ghz CPU
  • Full HD Support GPU
  • 5GB Memory"
M.Knight: I just have decent Gaming PC,i can play 2010-2015 Games. Hope it's okay
(1 Hour Later,The Game FPS Just Got 10-20)
M.Knight: (Facepalm)
Next goal is to make pull & push + lift & throw systems with mouse support and have skill levels in them and action indicators!
>What's your avatar about? Is it yours?
I did not do that drawing. It's a screenshot taken from a comic featuring characters from Touhou such as Tenshi and Iku (the girl in the avatar). It's drawn by someone under the name of Yohane.
Link to the comic (SFW, but navigating around Dynasty Reader is NSFW)

Forum statistics

Threads
109,170
Messages
1,042,698
Members
141,667
Latest member
Peng
Top