Movement_types - FIX - Verse compile error for NPC - Did you forget to specify using { /Fortnite.com/AI }

Summary

Verese Compile Failures after 38.10 for AI NPC Movement Types
I already have
in the top of my NPC definition however after todays update verse fails to compile with Script error 3506: Unknown identifier `movement_types`. Did you forget to specify using { /Fortnite.com/AI }

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

AI

Steps to Reproduce

Create NPC Character definition and set NavigateTo to use a specified Movement Type
NpcData.Navigatable.NavigateTo(NavTargetStart, ?MovementType:=MoveType)

    # Navigate toward the specified target
    NavigateTo<public>(Target:navigation_target, ?MovementType:movement_type = external {}, ?ReachRadius:float = external {}, ?AllowPartialPath:logic = external {})<suspends>:navigation_result

Expected Result

Actual compile errors in the Linter, clear patch notes explaining the full path change. Public submodules did not require full paths previous to this update, is this bug or intended?

Observed Result

Verse Fails to compile

Platform(s)

windows

Additional Notes

*** FIX ***
For those that find this trying to fix your issue you need to add the path to the Submodule to your using statement -

using { /Fortnite.com/AI }
using { /Fortnite.com/AI/movement_types }

Now you need to change anywhere you have movement_types.Walking to just Walking

Example:
Prior

NpcData.Navigatable.NavigateTo(NavigationTarget, ?MovementType := movement_types.Walking, ?ReachRadius := 100.0, ?AllowPartialPath := true)

After

NpcData.Navigatable.NavigateTo(NavigationTarget, ?MovementType := Walking, ?ReachRadius := 100.0, ?AllowPartialPath := true)

TIP
Then When you se your Movement Type you can set the full path:

        var GoToPoint : vector3 = vector3{}
        var MoveType: (/Fortnite.com/AI:)movement_type = (/Fortnite.com/AI/movement_types:)Walking
        var NavResults: navigation_result = navigation_result.Unreachable

Notice this pattern follows the same full pathing that the Left Up Forward Verse Transforms require.

This makes are NavigateTo statement above more verbose (longer) but it will prevent the issue from returning if Epic decides to Undo this change -

NpcData.Navigatable.NavigateTo(NavigationTarget, ?MovementType := (/Fortnite.com/AI/movement_types:)Walking, ?ReachRadius := 100.0, ?AllowPartialPath := true)

The Docs should be updated to reflect the correct verse syntax if we are going to get away from naming everything in a struct and use model pathing instead.

Feel free to reach out with questions. Hope this helps everyone :bear:

Hello, we are investigating this issue, thanks!

2 Likes

We have the same issue on on of our project, it will be fix before the next update?

I am having the same issue, im 1 year into this project now its at a total standstill as cant launch session due to valdation issues :expressionless: , I hope this is resolved soon

@Yale2k2 I have a Fix / workaround posted above, does adding the full path not work for you?

*** FIX ***
For those that find this trying to fix your issue you need to add the path to the Submodule to your using statement -

using { /Fortnite.com/AI }
using { /Fortnite.com/AI/movement_types }

Now you need to change anywhere you have movement_types.Walking to just Walking

Example:
Prior

NpcData.Navigatable.NavigateTo(NavigationTarget, ?MovementType := movement_types.Walking, ?ReachRadius := 100.0, ?AllowPartialPath := true)

After

NpcData.Navigatable.NavigateTo(NavigationTarget, ?MovementType := Walking, ?ReachRadius := 100.0, ?AllowPartialPath := true)
1 Like

Thats amasing thanks, works perfect now
now all I need to do is work out how to get sound for my npc’s everything I have tired either wont validate or wont work/buggy

FORT-1014965 has been ‘Closed’ as a duplicate of an existing known issue. Origin Issue: FORT-1012610

FORT-1012610’s status has changed to ‘Ready for QA’. A member of the QA department is investigating the issue.

1 Like

@Yale2k2 I have a custom sound class that a use a creative_device per npc_type and then call it, be sure to set the audio_player device to play FOR everyone and play FROM agent, basically the sound will play from the npc_agent and everyone can hear it. I based mine off this epic tutorial so I would recommend checking that out and then seeing if you can customize it for your needs - Stronghold 05 Set Up Audio and Visual Effects in Unreal Editor for Fortnite | Fortnite Documentation | Epic Developer Community

Thank you so much for this reply, sorry it took so long to reply
I will try to look into this over next few days around work, hopefully I can get it working as I have custom zombie type npcs and its so lame atm as they have no sound and it gives the player no spatial awareness when playing

1 Like