Files
HeroesStone_PRC8/_module/nss/night_encounter.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

22 lines
648 B
Plaintext

/* enc_nightonly
Ensure, an encounter only appears during night
hours (as defined in the module properties)
Make sure, the encounter is INACTIVE by DEFAULT!
*/
void main()
{
object oEnc = OBJECT_SELF;
if(GetIsNight())
{
if (GetLocalInt(OBJECT_SELF, "TIMER") == FALSE)
{
SetLocalInt(OBJECT_SELF, "TIMER", TRUE);
DelayCommand(1500.0, DeleteLocalInt(OBJECT_SELF, "TIMER"));
SetEncounterActive(TRUE, oEnc);
/* make sure, the encounter is inactive by default! */
DelayCommand(2.0f, SetEncounterActive(FALSE, oEnc));
}
}
}