|Hiding nest areas for unvisited secret locations|
|Click here for more tutorials!|
A secret area is nothing more that an area that only appears if a switch defined in PBS is ON. This switch is ignored by the Area option of the Pokédex; this treats the switch as if it was ON. This tutorial explains how to change this to only show the encounters for that area if its switch is ON.
In PokemonArea change:
if pbFindEncounter(enctypes,species) mappos=pbGetMetadata(enc,MetadataMapPosition) points.push(mappos) if mappos && mappos==region end
mappos=pbGetMetadata(enc,MetadataMapPosition) if mappos for loc in @mapdata[region] points.push(mappos) if region==mappos && loc==mappos && loc==mappos && (!loc || $game_switches[loc]) && pbFindEncounter(enctypes,species) end end