Hello, I've made made a boss in my game and have an event where if his HP falls below 50% he starts using a skill. Now my problem is, when he uses up all his SP he still is able to "Select" the skill from his movelist but then cannot perform it, wasting a turn. I'd like to know if there's a way I can make it so that when he runs out of SP, a switch that enables him to use the skill is turned off. That or any similar solution would be much appreciated.
Thanks for your time.
I haven't actually done any common events programming so I don't know exactly how it's typed out. I'll type out what should work though in something similar to BASIC. You'll ahve to translate it into a common event.
What you have now
(HP = Current HP ~~ THP = Total HP)
If HP < .5 * TPH then
Use skill
end if
What you should have
(Let's assume you need 50 SP to preform the move)
If HP < .5 * THP then
If SP > 49 then
use skill
end if
end if
If I'm completely wrong please say so. I should get around to programming common events though so I can actually help properly. <_<
I've never been able to have a common event work in a battle, however.
Thank you, but I'm not sure how to apply to the monster. Its the right idea but I'm not very good at scripting so I can't seem to get it to work.
So far what I have is for its Behavior is:
Attack, No Preconditions, Rating 5
Big Slash, Switch [00017: Big Slash] is ON, Rating 5
On the Battle Events tab for the monster group I have:
Trigger: Monster [23. Blade Master]'s HP is below 50% Frequency: Start Battle
Switch: [00017: Big Slash] = ON
Sorry for the trouble but I'm not sure of what to do now.
You can add another BATTLE EVENTS TAB to that monster group and have:
---------------------
Trigger: SWITCH [00017: Big Slash] = ON Frequency: MOMENT (or whatever the translation says,,you know something that keeps repeating as long as the conditions are met)
---------------------
---------------------
Set Variable: [00001: Blade Master SP] = Blade Master's SP
If [00001: Blade Master SP] <= 0
Switch: [00017: Big Slash] = OFF
---------------------
And I assume that this BATTLE EVENT:
Trigger: Monster [23. Blade Master]'s HP is below 50% Frequency: Start Battle <--- happens just once per battle i believe.
Switch: [00017: Big Slash] = ON
only happens once per battle.
Thank you!
[Resolved]