# Finding Navigation of Passed In Agent

**URL:** <https://forums.unrealengine.com/t/finding-navigation-of-passed-in-agent/2158611>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, question, fortnite\
**Created:** [November 29, 2024, 8:03pm UTC](https://forums.unrealengine.com/t/finding-navigation-of-passed-in-agent/2158611 "2024-11-29T20:03:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FortDawgNiteMan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FortDawgNiteMan](https://forums.unrealengine.com/u/FortDawgNiteMan)\
**Post date:** [November 29, 2024, 8:03pm UTC](https://forums.unrealengine.com/t/finding-navigation-of-passed-in-agent/2158611/1 "2024-11-29T20:03:02Z")

</div>

I am currently trying to have an enemy spawned from a creature spawner navigate to a specific point.

I believe everything is set up properly, however the code fails at,

Navigatable := Creature.GetNavigatable

Here is my code:

feindController := class(creative\_device):  
@editable  
CreatureSpawner:creature\_spawner\_device = creature\_spawner\_device{}  
@editable  
NavPoint:creative\_prop = creative\_prop{}

```
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
    CreatureSpawner.SpawnedEvent.Subscribe(OnSpawned)
OnSpawned(Agent: agent):void=
    spawn:
        NavTo(Agent,NavPoint)
    Print("fiend spawned")
NavTo(Agent: agent, Prop: creative_prop)<suspends>:void=
    Print("NavTo called")
    if:
        Print("if called")
        Character := Agent.GetFortCharacter[]
        Print("Character")
        Navigatable := Character.GetNavigatable[]
        Print("Navigatable")
    then:
        Print("then called")
        NewPos := Prop.GetTransform().Translation
        Print("Nav target: {NewPos}")
        NewNavTo := MakeNavigationTarget(NewPos)
        Navigatable.NavigateTo(NewNavTo)
        Print("Navigating to: {NewPos}")

```

Any advice is appreciated,

Thank you!
