Nantas

- Game developer -
Veteran
Joined
Jan 7, 2017
Messages
209
Reaction score
140
First Language
French
Primarily Uses
RMMV
Hey everyone ! Hope that you're going well !

I need your help, as I have no knowledge on javascript.
Here is the link of the tips and tricks : http://yanfly.moe/2016/03/23/tips-tricks-second-chance-kingdom-hearts/.

I would like to remove the state that revives the character after the effect is done once. Is that possible ?
It may use this <Custom Remove Effect> notetag I believe.

Thanks for reading, and thanks for your help !
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
14,074
Reaction score
15,023
First Language
English
Primarily Uses
RMVXA

I've moved this thread to JavaScript Support. Thank you.

 

Nantas

- Game developer -
Veteran
Joined
Jan 7, 2017
Messages
209
Reaction score
140
First Language
French
Primarily Uses
RMMV
Oh sorry @bgillisp ! I didn't notice that :kaoback:
 

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
148
First Language
English
Primarily Uses
RMMV
You'll need to clarify on what you mean by removing the state, as Yanfly set up the state as a passive, so it isn't really removed like normal states are. Do you want to make the state a passive as well? If so, for how long do you want to remove the state? Do you want to permanently remove the state after one use? Or do you have it so the state is being applied like normal states are? It's pretty difficult to tell without knowing how you're planning to apply and use the state.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,159
Reaction score
10,746
First Language
Czech
Primarily Uses
RMMV
There's no need to do that. Simply add one line.
<Custom Respond Effect>
// Check to see if the party is in battle, has the Second Chance flag, and if the target is dead with 0 HP.
if ($gameParty.inBattle() && target._secondChance && target.hp <= 0) {
// Play the revival animation.
target.startAnimation(49);
// Set the target's HP to 1.
target.setHp(1);
target.removeState(stateID);
}
</Custom Respond Effect>

But it cannot be a passive state as stated above, since passive states cannot be cleansed in any way other than unequipping that particular equip.
 

Nantas

- Game developer -
Veteran
Joined
Jan 7, 2017
Messages
209
Reaction score
140
First Language
French
Primarily Uses
RMMV
It's absolutely not a passive in my game : it is given with a skill, and I want to effect just once :)
Thank you @Poryg !


EDIT : I have just tested it and i works perfectly !!! Thank you very much !
 

Latest Threads

Latest Profile Posts

My entire family and I have Covid... If it's this bad with the vaccine, without must be terrible. Stay safe, everyone. This thing is a doozy.
Ugh. Head heavy with sick juice. I wish I could work on my stuff. o_O
GZZPUeX.png

Overflow Form
I'm coming back to my work with Learn RPG Maker MV. Soon I'll be posting previews screenshots for my "paterons"! :guffaw:

Forum statistics

Threads
118,520
Messages
1,116,599
Members
155,531
Latest member
NittlesAndQuimps
Top