RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

[XP] Monster behaviour help

Started by Sword_Bad, November 17, 2007, 04:58:26 PM

0 Members and 1 Guest are viewing this topic.

Sword_Bad

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.

Lominisio

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. <_<

Kokowam

I've never been able to have a common event work in a battle, however.

Sword_Bad

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.

djkdjl

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.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

Sword_Bad


Leventhan


Be kind, everyone you meet is fighting a hard battle.