State that wears off when character attacks

LudiTheUber

Villager
Member
Joined
Jan 14, 2022
Messages
5
Reaction score
2
First Language
English
Primarily Uses
RMMZ
I would like to make a state that wears off when the character affected by the skill attacks, not is attacked. Is there any way to do this?
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
202
Reaction score
177
First Language
English
Primarily Uses
RMMZ
Yeah, there are ways to do it. Are you currently using any plugins? And do you have an objection to plugin-based solutions? And by "attack" do you mean when they use the basic attack command only? Or also when they use any type of damaging skill/spell? Or also when they use any skill/spell period?
 

LudiTheUber

Villager
Member
Joined
Jan 14, 2022
Messages
5
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Yeah, there are ways to do it. Are you currently using any plugins? And do you have an objection to plugin-based solutions? And by "attack" do you mean when they use the basic attack command only? Or also when they use any type of damaging skill/spell? Or also when they use any skill/spell period?
I'm not using any plugins rn, and I'd like it to wear off when the character uses any attacking skill as well as basic attack.
 

Imperial_Steele

Villager
Member
Joined
Aug 22, 2021
Messages
14
Reaction score
5
First Language
English
Primarily Uses
RMMV
If you mean like the Hide state, you can put "Remove state: Hide" in all your Attacks. Though I don't know if that would negate any kind of sneak attack extra damage as you would no longer be hidden once the attack goes off. This assumes that this would target the actor and not the bad guy, in which case... whoops =/

I managed this in MV somehow, but I forget how and no longer have access to my old database =(
 

Arthran

Veteran
Veteran
Joined
Jun 25, 2021
Messages
202
Reaction score
177
First Language
English
Primarily Uses
RMMZ
The plugin-free way to do this is to add a common event to every skill that you want this to apply to, and in that common event, make a conditional that checks if the user is affected by that state, and if so, to remove it.

If you are open to a plugin-oriented method, then you could probably use VisuStella Battle Core (or something similar) and use a JavaScript tag in the note box of your State to make it remove itself after damage is dealt. Something like:

Code:
<JS Post-Damage as User>
  user.removeState(stateID);
</JS Post-Damage as User>

You'd replace stateID with the numerical ID of the state (excluding any leading zeros).
 

Latest Threads

Latest Profile Posts

Firefly130984 wrote on WallCat's profile.
Hello, I would try to beta test your game.
Parallel I would write a guide.
I am already planning some games to make in Unite... I hope it gets a solid release date soon!
Remember to do even 0,01% progress on your game today! You can!

Forum statistics

Threads
122,130
Messages
1,146,771
Members
160,421
Latest member
Sululu
Top