GetCreatureHomeWaypoint()

Get a creature's home waypoint; returns OBJECT_INVALID if none set.

object GetCreatureHomeWaypoint();

Description

Get a creature's home waypoint; returns OBJECT_INVALID if none set.



Remarks

Checks the calling object for the animation condition flag "NW_ANIM_FLAG_HAS_HOME". If the flag is found, then this function returns the local object stored in "NW_ANIM_HOME".

Returns the object stored in "NW_ANIM_HOME" on success and OBJECT_INVALID on failure.

Requirements

#include "x0_i0_anims"


Version

???

Example

// Checks the calling critter for a home waypoint.  If one is found, move the
// critter to it.
#include "x0_i0_anims"

void main()
{
    // Check the critter for a home waypoint.
    object oHomeWP = GetCreatureHomeWaypoint();

    // Verify we have a good waypoint to jump to then move 'em.
    if(GetIsObjectValid(oHomeWP))
    {
        AssignCommand(OBJECT_SELF, ActionJumpToObject(oHomeWP));
    }
}

See Also

functions:  SetCreatureHomeWaypoint
categories:  Get Data from Creature Functions


author: Baragg, editor: Mistress, contributor: Kookoo