Lionhead Challenge Language Documentation

Up to contents.

11 Position

A reference to a coordinate in game.

See also:

11.1 Finding a specific position

Finding a specific position

  1. {expression,expression,expression}
  2. {expression,expression}
  3. {object}
  4. camera position
  5. camera focus
  6. stored camera position
  7. stored camera focus
  8. landing position of object velocity heading coord_expression speed expression
  9. hand position
  10. left_right clicked position
  11. facing camera position distance expression
  12. last player expression spell cast position
  13. get target from position to position distance metres angle degrees
  14. arse position of object
  15. belly position of object
  16. focus position of object
  17. left_right hand position of object
  18. destination of object
  19. extra position expression of object
  20. get relative position of object to coord_expression
  21. get nearest position at object influence ring from coord_expression
  22. get relative position from object to coord_expression
  23. get relative position from coord_expression facing coord_expression to coord_expression
  24. get extra position string from object
  25. get extra position string focus from object
  26. get future position of epic miracle object with time expression seconds
  27. get future focus of epic miracle object with time expression seconds

11.2 Coordinate Arithmetic

Operators that have been overloaded to accept positions.

  1. position + position
  2. position - position
  3. expression * position
  4. position / expression
  5. -position
  6. (position)

11.1.1 {expression,expression,expression}

{X,Z,Y} coordinate.

11.1.2 {expression,expression}

{X,Y} coordinate.

11.1.3 {object}

Position of an object.

11.1.4 camera position

The camera current position.

Camera position

11.1.5 camera focus

The current camera focus position.

camera focus

11.1.6 stored camera position

The last stored camera position.

stored camera position

11.1.7 stored camera focus

The current stored camera focus position.

stored camera focus

11.1.8 landing position of object velocity heading coord_expression speed expression

If an object is something with Physics when using the velocty script function it applies a velocity to it towards a position. This calcs the approximate position a projectile will land excluding the effect of wind, other collisions etc.

landing position of MyMan velocity heading [ThrowData] speed 10.1

11.1.9 hand position

Returns the last know multiplayer friendly position of the hand, or if single player the current hand position.

hand position

11.1.10 left_right clicked position

Returns the last known position the hand clicked. (0,0,0 if never clicked)

left clicked position

11.1.11 facing camera position distance expression

Returns a position facing the camera position at a distance away.

facing camera position distance expression

11.1.12 last player expression spell cast position

Returns the position the player last cast a spell.

last player 1 spell cast position

11.1.13 get target from position to position distance metres angle degrees

Gets a position in the direction from/to at a defined distance and relative angle to the from/to. A vector is created from from/to and then using this as direction vector, a relative angle to it in the x/z axis, and distance along this said angle (+/- 0-> 180 degrees), I return a position which holds the distances in the x, y, and z.

get target from {LostBrother} to {Sister} distance 5 angle 210

11.1.14 arse position of object

Returns the position of the objects arse.

arse position of MyCreature

11.1.15 belly position of object

Returns the position of the objects belly.

belly position of MyCreature

11.1.16 focus position of object

Returns the position of the objects focus.

focus position of MyCreature

11.1.17 left_right hand position of object

Returns the position of the objects hand (left or right).

left hand position of MyCreature

11.1.18 destination of object

Position of an objects destination.

11.1.19 extra position expression of object

Some objects have extra positions (EPS) held in their mesh. This returns their position. There can be more than 1 ep in a mesh so you pass the offset starting at zero.

extra position 0 of object

11.1.20 get relative position of object to coord_expression

Gives a relative position of a world position relative to a passed object

MyPos=marker at get relative position of Villager1 to {MyWorldPos}

11.1.21 get nearest position at object influence ring from coord_expression

Gets the nearest position on the given towns influence ring, to the position specified.

get nearest position at MyTown influence ring from {1900, 100, 1036}

11.1.22 get relative position from object to coord_expression

Gets the world position from an object given a relative pos from the object

MyPos=marker at get world position from Villager1 to {MyRelPos}

11.1.23 get relative position from coord_expression facing coord_expression to coord_expression

Gets the world position from an object given a relative pos from the object

MyPos=marker at get world position from {MyPos} facing {MyPosfacing} to {MyRelPos}

11.1.24 get extra position string from object

Gets the extra position of a given object by the given string

MyHouseDoor = get extra position "BWS_EP_DOOR" from MyHouse

11.1.25 get extra position string focus from object

Gets the extra position focus of a given object by the given string

MyHouseDoor = get extra position "BWS_EP_DOOR" focus from MyHouse

11.1.26 get future position of epic miracle object with time expression seconds

Gets the future position of an epic miracle after a given time

MyEarthquakePos = marker at future position of epic miracle MyEarthquake with time 50 seconds

11.1.27 get future focus of epic miracle object with time expression seconds

Gets the future focus of an epic miracle after a given time

MyEarthquakePos = marker at future focus of epic miracle MyEarthquake with time 50 seconds

11.2.1 position + position

Adds the {X,Z,Y} components of the two positions.

11.2.2 position - position

Subtracts the {X,Z,Y} components of the two positions.

11.2.3 expression * position

Multiplies the {X,Z,Y} components of the position by the expression. Note that position * expression does not work.

11.2.4 position / expression

Divides the {X,Z,Y} components of the position by the expression. Note that expression / position does not work.

11.2.5 -position

Oposite position. Hasn't been used for a long time, but should probably work.

11.2.6 (position)

calculates the position in the brackets before any other position

{House} + ({Offset}/OffsetRatio)

This documentation generated by LHDOC, © Lionhead Studios 2000