PlayMobileAmbientAnimations_NonAvian()

This function should be used for mobile NPCs and monsters other than avian ones.

void PlayMobileAmbientAnimations_NonAvian();

Description

This function should be used for mobile NPCs and monsters other than avian ones. It should be called by the creature that you want to perform the animations.

Mobile creatures will have all the same behaviors as immobile creatures, just tending to move around more.

Creatures who are spawned in an area with the "NW_HOME" tag will mark that area as their home, leave from the nearest door during the day, and return at night.

Injured creatures will go to the nearest "NW_SAFE" waypoint in their immediate area and rest there.

If at any point the nearest waypoint is "NW_DETECT" or "NW_STEALTH", the creature will toggle search/stealth mode respectively.

Creatures who are spawned in an outdoor area (for instance, in city streets) will go inside areas that have one of the interior waypoints (NW_TAVERN, NW_SHOP), if those areas are connected by an unlocked door. They will come back out as well.

Creatures will also move randomly between objects in their area that have the tag "NW_STOP".

Mobile creatures will have all the same behaviors as immobile creatures, just tending to move around more.



Requirements

#include "x0_i0_anims"


Version

???

Example

// If we perceive a PC lets do animation.
// This script goes in the creature's OnPerception event.
#include "x0_i0_anims"

void main()
{
    object oPC = GetLastPerceived();

    if(GetIsPC(oPC))
    {
        // We preceive a PC so lets move about.
        PlayMobileAmbientAnimations_NonAvian();
    }
}

See Also

functions:  PlayAnimation | PlayImmobileAmbientAnimations | PlayMobileAmbientAnimations_Avian
categories:  Animation Functions


author: Baragg, editor: Mistress, contributor: Kookoo