Moghunter's Pick Up & Throw - Minor Edit Request

Ravenith

Veteran
Veteran
Joined
Mar 27, 2012
Messages
263
Reaction score
15
First Language
Greek
Primarily Uses
Heya.

I'm trying to use this plugin (https://atelierrgss.wordpress.com/rmv-pick-up-and-throw/) and stumbled upon an issue with autotiles and the way MV handles their passability.

Long story short, I would like to have a Region in which the player cannot throw events.

I'd like some help to add another check that checks whether the tile's Region is X, and if so, return false.

Any help? Thanks in advance!

Code:
//==============================
// * can Pass Throw
//==============================
Game_CharacterBase.prototype.canPassThrow = function(x, y, d) {
    var x2 = $gameMap.roundXWithDirection(x, d);
    var y2 = $gameMap.roundYWithDirection(y, d);
    if (d === 2) {x3 = x; y3 = y + 1;   
    } else if (d === 4) {x3 = x - 1;y3 = y;       
    } else if (d === 6) {x3 = x + 1;y3 = y;   
    } else {x3 = x;y3 = y - 1;
    };
    if (!$gameMap.isValid(x2, y2)) {
        return false;
    };
    if (this.isThrough() || this.isDebugThrough()) {
        return true;
    };
    if (!$gameMap.isPassable(x3, y3)) {
        return false;
    };
    if (this.isCollidedWithCharacters(x2, y2)) {
        return false;
    };
    return true;
};
 

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

Latest Threads

Latest Posts

Latest Profile Posts

My kitty still young (3-4 months), I think I could teach her some funny tricks... like: "Play dead-ly good music for my games"
Here's a quality DPS class idea: The Beekeeper, who uses the "Bees!!" skill to attack and poison enemies.
Please don't create long, boring cutscenes in which characters do nothing but stand around talking.
What if I took a lesson from Half Minute Hero? Let the player get dumb powerful each area, but reset them down to just slightly stronger than before for the next map?
Been averaging 2-3 hours sleep for almost a month now. Starting to space out all the time ^^;

Forum statistics

Threads
94,264
Messages
919,484
Members
123,982
Latest member
Rendechuu
Top