Trace (script event)

Game class

This event operates on an instance of the game class type {{{gameclass}}}

Description

Returns the fraction of movement completed before the box from ‘mins’ to ‘maxs’ hits solid geometry // when moving from ‘start’ to ‘end’. The ‘passEntity’ is considered non-solid during the move.

Usage

float trace( vector start, vector end, vector mins, vector maxs, float contents_mask, entity passEntity )

Parameters

  • [start] - The starting point for the trace operation.
  • [end] - The ending point for the trace operation.
  • [mins] - A point used in conjunction with maxs to define the size of the bounding box used.
  • [maxs] - A point used in conjunction with mins to define the size of the bounding box used.
  • [contents_mask] - A flag to define the types of surfaces to ignore. These masks are defined in doom_defs.script.
    • MASK_ALL
    • MASK_SOLID
    • MASK_MONSTERSOLID
    • MASK_PLAYERSOLID
    • MASK_DEADSOLID
    • MASK_WATER
    • MASK_OPAQUE
    • MASK_SHOT_RENDERMODEL
    • MASK_SHOT_BOUNDINGBOX
  • [passEntity] - An entity to ignore.

Examples

sys.trace( begin, send, '0 0 0', '0 0 0', MASK_SOLID|CONTENTS_RENDERMODEL, $crane_hang );

Notes

Once a trace has been issued, other special events can be called to return more detailed information about the trace. See the following articles…