Difference between revisions of "Distance"

From FreeSpace Wiki
Jump to: navigation, search
(New page: Distance (Status operator) Returns the distance between two objects. These objects can be either a ship, a wing, or a waypoint. Returns a numeric value. Takes 2 arguments... 1: The na...)
 
(Important comment added - distance should be widely used in departure cues by replacing are-waypoints-done-delay)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Distance (Status operator)
+
Distance (Status operator)
Returns the distance between two objects.  These objects can be either a ship, a wing, or a waypoint.
+
        Returns the distance between two objects.  These objects can be either a ship, a wing, or a waypoint.
 +
Returns a numeric value.  Takes 2 arguments...
 +
        1:    The name of one of the objects.
 +
        2:    The name of the other object.
  
Returns a numeric value.  Takes 2 arguments...
+
==Comments==
1: The name of one of the objects.
+
Commonly used to determine if a ship is close enough to a node to warp out, but it should also be widely used in the departure cue of ships that are supposed to jump at the end of a waypoint path. Using [[are-waypoints-done-delay]] may not work because ships oftentimes miss the waypoint and turn around it in a futile attempt to catch it. Using a distance check would not only prevent this, but would also give a more realistic warpout effect because the ship will not slow down to 0 before departing.
2: The name of the other object.
 
  
==Comments==
 
Commonly used to determine if a ship is close enough to a node to warp out.
 
 
[[Category:Retail SEXPs]]
 
[[Category:Retail SEXPs]]

Revision as of 21:07, 3 April 2009

Distance (Status operator)
        Returns the distance between two objects.  These objects can be either a ship, a wing, or a waypoint.
Returns a numeric value.  Takes 2 arguments...
        1:     The name of one of the objects.
        2:     The name of the other object.

Comments

Commonly used to determine if a ship is close enough to a node to warp out, but it should also be widely used in the departure cue of ships that are supposed to jump at the end of a waypoint path. Using are-waypoints-done-delay may not work because ships oftentimes miss the waypoint and turn around it in a futile attempt to catch it. Using a distance check would not only prevent this, but would also give a more realistic warpout effect because the ship will not slow down to 0 before departing.