- Joined
- May 8, 2015
- Messages
- 52
- Reaction score
- 19
- First Language
- English
- Primarily Uses
I see
I'm trying to put together a super barebones package for DIY ABS. (I don't want to use any of the ABS plugins that currently exist, and I want to put together a tutorial on how to make your own, since this category of question in pretty common)
Game_Interpreter.prototype.command285
in rpg_objects.js, but I don't understand it or the Yanfly code I have found online. Can someone explain how to accomplish what I'm trying to do below? And whether it is even possible to do it this way? If this is completely the wrong approach, what should I do instead?
JavaScript:
Scene_Map.prototype.attack_monster = function() {
let x = $gamePlayer._x;
let y = $gamePlayer._y;
let attack = $gamePlayer.attack_dmg;
let targetEvents = GetEventsAtLocation( x, y-1 ); // how would custom method 'GetEventsAtLocation(x,y)' return an array of events at that map location?
let monster = FilterForMonster( targetEvents ); // loop to filtering for the first event.IsMonster == true found in the targetEvents array
if ( monster ) {
monster._hp = monster._hp - attack;
}
}
I'm trying to put together a super barebones package for DIY ABS. (I don't want to use any of the ABS plugins that currently exist, and I want to put together a tutorial on how to make your own, since this category of question in pretty common)
Last edited: