Table of Contents

PAGE INFO ALREADY TRANSFERRED TO THE NEW WIKI - Using Sinfar Spawning System

Sinfar's spawning system is documented here: Sinfar Spawning System and it can be used inside houses with a few differences.

Usage Difference

  1. The tag must have the additional prefix “_P_”, for example: _P_SPAWN_C_P_25_SERVANT:
  2. The variables must have the additional prefix “P_”, for example P_SPAWN_CHANCE:

How It Was Enabled

Simply by adding those 2 lines:

    RegisterVariableEvent(oArea, "EVENT_WOKEUP", "p_x_wokeupare");
    RegisterVariableEvent(oArea, "EVENT_SUSPEND", "p_x_suspendare");

.. When an house area is created (SetupHomeArea in home_include). You could do the same by setting variables on your areas (:houses:scripts:variable_based_events) and create your own system, but for Sinfar Spawn System, it is done automatically.

You can look at those 2 scripts: p_x_wokeupare and p_x_suspendare: they basically call the same functions but of course in the context of an house script (p_) so GetLocalString automatically ensure that the variable name is prefixed by P_ and the tag check expect the _P_ prefix because it is also mandatory for a player blueprint.

phpBB Appliance - Powered by TurnKey Linux