DistanceTo (script event)

From modwiki

Jump to: navigation, search

Description

Returns the distance of this entity to another entity.

Usage

In your script type...

float distanceTo( entity other )

Parameters

  • [other] - The entity to trace the distance to.

Examples

 
distance = $startObject.distanceTo($goalObject);

Notes

This script event returns the distance between the start and goal object as a float.


Personal tools
Main