Show / Hide Table of Contents

    Interface IFollowComponent

    This component adds the ability for a character to follow another entity (i.e to keep walking to where the entity is. The follow settings can be configured to set how aggressive that follow is).

    Inherited Members
    IComponent.Name
    IComponent.Entity
    IComponent.RegistrationType
    IComponent.Init(IEntity, Type)
    IComponent.AfterInit()
    System.IDisposable.Dispose()
    System.ComponentModel.INotifyPropertyChanged.PropertyChanged
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    [RequiredComponent(typeof(IWalkComponent), true)]
    [RequiredComponent(typeof(IHasRoomComponent), true)]
    [RequiredComponent(typeof(ITranslateComponent), true)]
    public interface IFollowComponent : IComponent, IDisposable, INotifyPropertyChanged

    Properties

    | Improve this Doc View Source

    TargetBeingFollowed

    Gets the target that is currently being followed (or null if not currently following anybody).

    Declaration
    IObject TargetBeingFollowed { get; }
    Property Value
    Type Description
    IObject

    The target being followed.

    Methods

    | Improve this Doc View Source

    Follow(IObject, IFollowSettings)

    Starts following the specified object throughout the game. The character will walk to where the object is at, where the follow settings can be configured to say how aggressively to follow, and to what distance from the target. Calling Follow with another object will stop following the current object and start following the new object. To stop following altogether, call the Follow again with null as the target object. Note however, that the character will not stop its current walk. If you want to also stop the current walk, you should use StopFollowingAsync().

    Declaration
    void Follow(IObject obj, IFollowSettings settings = null)
    Parameters
    Type Name Description
    IObject obj

    Object.

    IFollowSettings settings

    Settings.

    | Improve this Doc View Source

    StopFollowingAsync()

    Stops following the current target (and also stops the current walk).

    Declaration
    Task StopFollowingAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    The following async.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX