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 ![]()