Help with removing a state upon taking any action except for Guard.

Status
Not open for further replies.

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
I'm trying to get a Hide skill to function, and I don't know how it to remove it from the actor if they do anything besides use Guard. If anyone has some insight, that would be great.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,948
First Language
English
Primarily Uses
RMMV
Are you using Yanfly plugins or do you need a solution that doesn't involve them?
 

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
I am using Yanfly plugins, though I don't have every single one. Which ones do I need?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,948
First Language
English
Primarily Uses
RMMV
Just Buffs & States Core. Put the following in your Hide state's notetag:

Code:
<custom action start effect>
let action = user.currentAction();
if (action && (!action.isSkill() || action.item().id !== user.guardSkillId())) {
user.removeState(24);
}
</custom action start effect>
Replace 24 in removeState with the ID of Hide.
 

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
247
Reaction score
290
First Language
English
Primarily Uses
RMMV
@Trihan Sorry it took me so long to get to this, as I haven't been on my computer in days. But it works like a charm. Thank you kindly.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,948
First Language
English
Primarily Uses
RMMV
No worries, glad to be of assistance. :)
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,650
Reaction score
4,631
First Language
English
Primarily Uses
RMMV

I've moved this thread to Javascript/Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.


@Sword_of_Dusk Has your inquiry been resolved? If so, please report your thread so a moderator can close it. Thank you.
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,650
Reaction score
4,631
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?
Halloween, a day where kids are encouraged to take candy from strangers.
Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
Took a break from spriting dinosaurs to carve a dinosaur pumpkin.

Forum statistics

Threads
104,672
Messages
1,007,986
Members
136,161
Latest member
vendomis
Top