rivelle

Villager
Member
Joined
Jan 16, 2023
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMZ
Hello!

I was trying to use it as a state that is called via a self buff skill. The state icon appears after using the skill, but the effect does not work(no barrier).

So I tried using it as a skill(adding a specific amount of barrier each skill use). It does work, BUT I want it to last only after the turn it was used: so, if in turn1 I use the skill, ended my turn, enemy uses their turn and my barrier was not broken, in my turn2, I want it to be automatically be removed.

Now I know you can specify how long the barrier lasts, the problem is that the skill I attaching it to can be used multiple times in 1 turn, so the expiration stacks on top of each other: so if I use the skill twice in 1 turn, instead of it expiring after 1 turn, it doesn’t because I used it twice, the expiry is now 2 turns.

Is there a solution to this?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,930
Reaction score
6,745
First Language
English
Primarily Uses
RMMV
Hello!

I was trying to use it as a state that is called via a self buff skill. The state icon appears after using the skill, but the effect does not work(no barrier).
Correct. If you look at the instructions for the plugin, the notetags to give barrier points are for Skills and Items, they don't work in states.

So you either put it as a notetag in the skill or use the JavaScript calls in conjunction with Buffs & States notetags.

So I tried using it as a skill(adding a specific amount of barrier each skill use). It does work, BUT I want it to last only after the turn it was used
Give the appropriate timing to your state. Reference the bottom of the Barrier Points instructions and give your state the notetag from Buffs & States Core:
Code:
<Custom Leave Effect>
user.loseBarrier(user.barrierPoints());
</Custom Leave Effect>

so if I use the skill twice in 1 turn, instead of it expiring after 1 turn, it doesn’t because I used it twice, the expiry is now 2 turns.
Give the state this notetag:
Code:
<Custom Apply Effect>
if (user.isStateAffected(stateId))
    user._stateTurns[stateId]++;
</Custom Apply Effect>
 

Latest Threads

Latest Posts

Latest Profile Posts


3d Yandere RPG maker game by labylin
With this map, I tried to emulate a Gameboy Color/Advance style.
Hacknet's a hypocritical game.
It's a game about hacking... that's been made in Net framework and the code was left unobfuscated.
So it's a game about hacking that's vulnerable to hacking.
The irony. :p
My message count stands at 999. I was going to ask if I get anything special for hitting 1,000 but then I looked at the post count of some other people who shall remain nameless. Now I don't feel special anymore. I need to either start posting a lot more or wipe my tears away and just focus on my game. Hopefully my keyboard is waterproof. ;_;

Forum statistics

Threads
131,766
Messages
1,223,161
Members
173,533
Latest member
joeyidc
Top