Help with a Poisoning Script

Zacyiia

The Endless Void
Member
Joined
Apr 15, 2015
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
I am writing a plugin that will reduce the party's hp by 10 points per step If they should enter a map without the right key Item.
What I plan on having this plugin check for is the following:

-If one of eight map events are present

-If one of these map events is present; check for one of the nessacery Key Items
Ex: Fire Power Glove / Wind & Fire Power Glove / Fire & Water Power Glove

If the player enters an area where a Fire Event is present and has a Power Glove upgraded with Fire, then no health will be lost.
If the player enters an area where a Fire Event is present and has a Power Glove, but is not upgraded with Fire, then they will lose 10 hp each step.

Right now my plugin is able to check for the Game Variable 1 (which I named fire), and if the variable is not equal to 1, then the
player takes -10 hp each step. I am not really sure how to make the two checks above so that I can just use the Key Item instead of variables. Also I don't know how to affect the entire party at once in regards to $gameActors.actor().gainHp().

Here is my code so far:

(function() {
Game_Player.prototype.executeMove = function(direction) {
this.moveStraight(direction);

if ($gameVariables.value(1) != 1 ){
$gameActors.actor(1).gainHp(-10)
$gameActors.actor(2).gainHp(-10)
$gameActors.actor(3).gainHp(-10)
}
};
})();
 

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

Latest Threads

Latest Profile Posts

<-- Meet Seith. He begins the story as an apprentice druid, learning to survive in the wilderness by communing with nature and honing his herbalism. Seith has a deep desire to understand the world around him. When wells of chaotic energy begin erupting from the land,corrupting plant, animal and man alike, Seith finds himself on a journey to discover just what this means for the fate of his home, the land of Myarr.
I installed a ledge for my cat.
:/ sigh.... my cat just licks the gravy stuff from her food then leaves the rest of it alone and bugs me for more food.... I hate how picky this animal is.
My card game is finally in my possession! only took a few years of designing and almost a month to have it printed out!
Lilly wrote on CrimsonShoujo's profile.
Welcome to the forums, wonderful picture you have on your profile~

Forum statistics

Threads
99,454
Messages
965,498
Members
131,070
Latest member
Porno_Kid
Top