Jaysyn904 6153db8683 Quest persistence bugfixing & continuing NESS spawn conversion
Quest persistence bugfixing & continuing NESS spawn conversion.

Co-Authored-By: Awetizmo <107700980+Awetizmo@users.noreply.github.com>
2022-06-21 08:56:20 -04:00

42 lines
1.1 KiB
Plaintext

//:://////////////////////////////////////////////
//::
//:: ra_onareaenter.nss
//:: Copyright (c) 2022 Project RATDOG
//::
//:://////////////////////////////////////////////
/*
Default OnAreaEnter script for NESS spawn
functions.
*/
//:://////////////////////////////////////////////
//::
//:: Created By: Jaysyn
//:: Created On: 20220620
//::
//:://////////////////////////////////////////////
#include "spawn_functions"
#include "tgdc_explore_inc"
void main()
{
// Spawn_OnAreaEnter() can take three arguments - the name of the heartbeat
// script to execute, the heartbeat duration, and a delay for the first
// heartbeat. They default to spawn_sample_hb, 6.0, and 0.0 respectively; as
// if it were called like:
// Spawn_OnAreaEnter( "spawn_sample_hb", 6.0, 0.0 );
if ( GetIsAreaAboveGround( OBJECT_SELF ) &&
! GetIsAreaNatural( OBJECT_SELF ) )
{
// Indoors - no delay on the first HB
Spawn_OnAreaEnter( "spawn_sample_hb", 6.0, 0.0 );
}
else
{
// Outdoors or underground - do a 3 second delay on the first HB
Spawn_OnAreaEnter( "spawn_sample_hb", 6.0, 3.0 );
}
}