Dungeon Souls Editor Quick Onboarding Modules Items Sprites Functions Steam Workshop Contact

distanceToNearestEnemy

Returns the distance to the nearest enemy. This function's result depends on the invocation location. If it's invocated in a player context, it will return the distance between the player and the nearest enemy. If invoked on the item's initialization, it will return the distance between the item's drop location and the nearest enemy.

Arguments

This function does not have any arguments

Return

Return Type Description
RealThe distance to the nearest enemy.