Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Thanks again for this great plugin. If you ever get around to adding anything more to it, the only thing I wished I had throughout my development was a way to script call or plugin command a check to see whether or not an event was in the player's line of sight. That'd be sick. o/

EDIT: It took some work but I figured out how to do it. Here's how I did it in case you ever want an idea for an update --- Within your KoTCRogueLikeLoSCheck() function I added $gameVariables.setValue(1, []); at the very start of the function then added $gameVariables.value(1).push([losarray[d][0], losarray[d][1]]); within the if ($KoTCRoguelikeLoSMap[losarray[d][0]] !== undefined && $KoTCRoguelikeLoSMap[losarray[d][0]][losarray[d][1]] == 0) statement.

Lastly, inside the event that I want to know whether or not it can be seen I add this script call:

$gameVariables.setValue(2, $gameVariables.value(1).toString());

ev = $gameMap.event(this.eventId());

$gameVariables.setValue(3, []);

$gameVariables.value(3).push([ev.x, ev.y]);

$gameVariables.setValue(4, $gameVariables.value(3).toString());

Followed by a conditional branch with this script call:
$gameVariables.value(2).includes($gameVariables.value(4))

If that script condition returns true, the event is in line of sight. If false, the event is in the fog.

Personally, I needed this feature to keep players from using skills and/or activating proximity triggers on events that were on the other side of a wall or behind a pillar. There's probably a better way to do it but this works for now.