SetCurrentInteractionTarget(object)

Set an object as the caller's interactive target.

void SetCurrentInteractionTarget(
    object oTarget
);

Parameters

oTarget

The object we wish to store on the caller as its interaction target.


Description

Set an object as the caller's interactive target.

To remove the caller's interactive target, set it to OBJECT_INVALID.



Remarks

This sets a local object on the caller named "NW_ANIM_TARGET".


Requirements

#include "x0_i0_anims"


Version

???

Example

// Check if we have a "friend" marked on ourselves.  If so, mark them as our interaction target also.
#include "x0_i0_anims"

void main()
{
    object oBud = GetCurrentFriend();

    // oBud is valid so lets make them our interaction target.
    if(GetIsObjectValid(oBud))
    {
        // Note:  This will write over the caller's interaction target if they already have one.
        SetCurrentInteractionTarget(oBud);
    }
}

See Also

functions:  GetCurrentInteractionTarget
categories:  Action on Object Functions


author: Baragg, editor: Mistress, contributor: Kookoo