Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
37
Reaction score
8
First Language
Français
Primarily Uses
Hi !

I'm using Yanfly's plugin and i am struggling with a skill.

I have a state "Water" and a state "Freeze". Let's say that i apply "Water" to all ennemis with a Surf

Now, with my skill "Blizzard" i want to freeze my ennemies affected by "Water". But, when i do it, it will not apply it somehow

my code is:

<Target Action>

<Whole Action>

if target.isStateAffected(15)

add state 14: target, show

wait: 20

else

wait: 20

end

</Whole Action>

</Target Action>

This works like a charm when it comes to mono target, but doesn't work with multiple target. What i am missing ?

Thanks in advance for your time !
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,891
Reaction score
6,695
First Language
English
Primarily Uses
RMMV
Your notetags are wrong. You can't nest notetags like that. You have to finish one before you start the other:
<target action>
</target action>
<whole action>
</whole action>
 

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
37
Reaction score
8
First Language
Français
Primarily Uses
Your notetags are wrong. You can't nest notetags like that. You have to finish one before you start the other:
<target action>
</target action>
<whole action>
</whole action>
Hi, thanks for your quick answer, it resolved a part of my skill. Now it does works when i use my "Surf" skill into "Blizzard" skill, all enemies are frozen. Good

But now, i applied "Water" on 2 Enemies but 3 of them didn't have the state on them. I casted "Blizzard" on them and all of them got frozen. What i would like is that only thoose 2 enemies with "Water" state on them would be frozen and not the 3 others.

I don't know if there is a way to check each enemy to scan who is affected by "Water" and who's not..
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,891
Reaction score
6,695
First Language
English
Primarily Uses
RMMV
I think you actually need to use target action, not whole. Doing target action executes the commands against each enemy individually, whereas whole evaluates it once for the entire troop. So I think that would check the first enemy of the troop to have the state then apply it to all of them.
 

Grumphlu

Veteran
Veteran
Joined
Mar 25, 2015
Messages
37
Reaction score
8
First Language
Français
Primarily Uses
I think you actually need to use target action, not whole. Doing target action executes the commands against each enemy individually, whereas whole evaluates it once for the entire troop. So I think that would check the first enemy of the troop to have the state then apply it to all of them.
Ok, i think i understood it better. I seperated my Whole Action sequence (for animations, camera blablabla) then i wrote a Target Action in order to check/apply the state. I guess i will do the same for my AOE dmg. I have others like this that will do Crit if ennemies are affected by a certain state and i don't want it to crit if some of them are not affected with that state.
The only problem will be that dmg will appear one by one after my animation, making it a bit smoothless but it is fine.

I think we can sey it is done :)
Thank you so much for your help and have a great week!
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,891
Reaction score
6,695
First Language
English
Primarily Uses
RMMV
I mean, you could also not use action sequence commands and instead eval it inside your setup action.

Code:
Eval: $gameTroop.aliveMembers().forEach(enemy => enemy.isStateAffected(15) ? enemy.addState(14) : 0);

but I don't think it makes a difference in this situation.
 

Latest Threads

Latest Posts

Latest Profile Posts

Hamburger!? Yeeah.
I love it when the approval queue is 80% spammers. Makes it so fast to power through!
I found some inspiration and have started work on a Point and Click style exploration game in a dead mall. I am hopefully going to push MZ in some unexpected directions. I always love seeing the engine do things that folks might not expect. Its good to have found some direction. Thanks for the support a few weeks back when the writers blog was hitting heavy.
Don't you want your heroes or monsters to lose some of their MAXHP or MAXMP? Don't you?
Really, why wouldn't you? :p
Yeah, it's gonna get worse after every hit they take, but so what?
Aren't they courageous fighters? Or stupidly brute mobsters?

Forum statistics

Threads
131,730
Messages
1,222,706
Members
173,475
Latest member
georgino15
Top