ff_u_v_explore

Automatically explore the full area for player.

Variables

ENABLE__FF_U_V_EXPLORE: (string) (opt-out) Set to “N” on module to disable.

EXPLORE_AREA_FOR_PLAYER: (int) (opt-in) Set to 1 on area.

Source code

// @code
#include "ff_i_core"


// (bool)
// Explore area for player on Enter
const string EXPLORE_AREA_FOR_PLAYER = "EXPLORE_AREA_FOR_PLAYER";


// -----------------------------------------------------------------------------

void main()
{
  string sEvent = GetCurrentEvent();
  if (sEvent == ON_REGISTER)
    SubscribeToEvent(ON_DEFAULT_AREA_ENTER, __FILE__);
  else if (sEvent == ON_DEFAULT_AREA_ENTER)
  {
    object oArea = OBJECT_SELF;
    object oPC = GetEnteringObject();
    if (GetLocalInt(oArea, EXPLORE_AREA_FOR_PLAYER))
      ExploreAreaForPlayer(oArea, oPC);
  }
}