I'm using https://plugin.fungamemake.com/archives/1606 this along with some eventing to basically simulate a strat rpg while on certain maps (I don't need an actual tactical system as what I'm doing, I don't need the battle side of any of those). I'm having an issue with the math on things tho. I have an example of how to place a diamond of sorts under someone and I figured out how to place it under the player, but the thing is...
I don't quite understand the example/demo code enough to know how to get the amount of tiles covered that I need per event/player.
this looks like this...
I'm trying to get different numbers instead of 5 across based on player/event stuff, but even messing around with the numbers in the code above, I can't get what I'm looking for. Crazy thing is I know this is probably a simple solution, but my math skills aren't amazing by ANY means. Anyone with better Javascript/Math skills have a solution, I'm all ears.
I don't quite understand the example/demo code enough to know how to get the amount of tiles covered that I need per event/player.
JavaScript:
var cX = $gamePlayer._x;
var cY = $gamePlayer._y;
for(var x = 0; x < 5; x++) {
for(var y = 0; y < 5; y++) {
if (Math.abs(x - 2) + Math.abs(y - 2) < 3) {
$gameMap.setTileTone(
cX + x - 2,
cY + y - 2,
0, 0, 255, 160);
}
}
}
this looks like this...
I'm trying to get different numbers instead of 5 across based on player/event stuff, but even messing around with the numbers in the code above, I can't get what I'm looking for. Crazy thing is I know this is probably a simple solution, but my math skills aren't amazing by ANY means. Anyone with better Javascript/Math skills have a solution, I'm all ears.