You need to call the
los method manually: my plugin doesn't support stuff like event triggers, it's literally a script function. Also, it doesn't draw anything visible to the player in-game: it's just for checking sight, not drawing it.
However, during playtest, it should output a debug representation to the Console tab of the dev tools window, e.g.
This screenshot illustrates 4 checks for line-of-sight from map event 3 (currently facing left <-):
- To map event 15, with default FoV: sight is clear for 4 tiles, then blocked =>
false.
- To map event 9, with 180° FoV: sight is clear to the target =>
true.
- To map event 13, with 300° FoV: sight is clear to the target =>
true.
- To map event 13, with default FoV: target is not within FoV, so line is not traced =>
false.
If you're only seeing a pentagon (represents viewer) followed by
false, that means line-of-sight is being blocked by the first tile.
If you're still having trouble, it may help to share screenshots of:
- Your map, in region editing mode (so that tiles, events, and region IDs are all visible);
- The script call you are using; and
- The Console tab of the dev tools window.
Edit: oh, maybe you're using pixel-movement? If so:
Spoiler: pixel movement suggestion
You can try opening Cae_Tweaks in a text editor and edit this part:
JavaScript:
Game_CharacterBase.prototype.los = function(char, fov) {
if (!(char instanceof Game_CharacterBase))
return false;
const x0 = this.x,
y0 = this.y,
x1 = char.x,
y1 = char.y,
d = this.direction();
...to this:
JavaScript:
Game_CharacterBase.prototype.los = function(char, fov) {
if (!(char instanceof Game_CharacterBase))
return false;
const x0 = Math.round(this.x),
y0 = Math.round(this.y),
x1 = Math.round(char.x),
y1 = Math.round(char.y),
d = this.direction();