It’s kinda odd having birds turn up for a moment they fly over the ladder tiles. Is there a way to make events like that ignore the ladder?
How do I make event ignore ladder tile?
RPG Maker MZ SupportMaybe yo can make a plugin for your specific character?
Code:
Game_CharacterBase.prototype.isOnLadder = function() {
//add something here
if(this.isThrough()){
return false;
}
return $gameMap.isLadder(this._x, this._y);
};
I'd say use region restrictions and just let them not fly over the ladders.
if the event is same as character and want and through wont work,
it should add a meta tag to ignore those for ladders.
so you could add something like <bird> so events with that tag
ignore it.
the same could apply to the bushes if it does the same:
you may chance "ignore ladder" and "ingore bush" to "bird"
and use the note tag <ignore bush> to avoid things.
you can make it the same so it applies to both if both has "bird".
depends if its always above events or same as character 😉
it should add a meta tag to ignore those for ladders.
so you could add something like <bird> so events with that tag
ignore it.
the same could apply to the bushes if it does the same:
JavaScript:
Game_CharacterBase.prototype.isOnLadder = function() {
if ($gameMap.events().meta["ignore ladder"]) return false;
if(this.isThrough()) return false;
return $gameMap.isLadder(this._x, this._y);
};
Game_CharacterBase.prototype.isOnBush = function() {
if ($gameMap.events().meta["ignore bush"]) return false;
if(this.isThrough()) return false;
return $gameMap.isBush(this._x, this._y);
};
you may chance "ignore ladder" and "ingore bush" to "bird"
and use the note tag <ignore bush> to avoid things.
you can make it the same so it applies to both if both has "bird".
depends if its always above events or same as character 😉
It's a puzzle that player has to climb a "ladder" without getting hit by the bird, so they have to fly over the ladder anyway.
Thank you, utunnels and ShadowDragon! It worked, but if I use ShadowDragon's version, I get a TypeError: Cannot read property 'ignore ladder' of undefined. How do I fix it?
Because
$gameMap.events().meta is not valid JavaScript syntax.Instead, you'd do
Code:
if (typeof this == Game_Event && this.event().meta["ignore bush"])
It works perfectly now. Thank you so much!
that is a small typo on my end, as it was a bit untested,
but you can use the notetag if you have other events and or keep
is through OFF for touching purposes or mechanic, so notetag could
work out cleaner.
good luck on your project and puzzle 😉
but you can use the notetag if you have other events and or keep
is through OFF for touching purposes or mechanic, so notetag could
work out cleaner.
good luck on your project and puzzle 😉
Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-event-ignore-ladder-tile.171448/