PoA_PRC8/_module/nss/spawnwarden.nss
Jaysyn904 8d97886c3f Changed folder name.
Changed folder name.
2022-10-07 21:08:37 -04:00

21 lines
576 B
Plaintext

location lTarget;
object oTarget;
//Can go on enter of an area or on enter of a tracks trigger.
//Basically you spawn an npc, then after a while they dissapear.
//This script will not spawn an npc if one already exist.
void main()
{
object oPC = GetEnteringObject(),
oObject = GetWaypointByTag("WP_warden_01");
if (!GetIsObjectValid(GetNearestObjectByTag("warden", oObject)))
{
CreateObject(OBJECT_TYPE_CREATURE, "warden", GetLocation(oObject));
}
oTarget = GetObjectByTag("warden");
DelayCommand(2000.0, DestroyObject(oTarget, 0.0));
}