ff_u_pc_settings

Set settings and preferences on the PC.

Sets:

  • NWNX_Object_SetConversationPrivate

Variables

ENABLE__FF_U_PC_SETTINGS: (string) (opt-in) Set to “Y” on module to enable.

Source code

// @code

#include "ff_i_core"

const string ENABLE__FF_U_PC_SETTINGS = "ENABLE__FF_U_PC_SETTINGS";

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

void OnClientEnter()
{
  object oPC = GetEnteringObject();
  if (!GetIsPC(oPC))
    return;

  NWNX_Object_SetConversationPrivate(oPC, TRUE);
}


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

void main()
{
  if (!GetModuleFlag(ENABLE__FF_U_PC_SETTINGS, FALSE))
    return;

  string sEvent = GetCurrentEvent();
  if (sEvent == ON_REGISTER)
    SubscribeToEvent(ON_DEFAULT_CLIENT_ENTER, __FILE__);
  else if (sEvent == ON_DEFAULT_CLIENT_ENTER)
    OnClientEnter();
}