SpawnDecal

int SpawnDecal (int tid, str decalname [, int flags [, fixed angle [, int zoffset [, int distance]]]])

Usage

Creates a decal on a wall by tracing a line from the actor with the specified TID until hitting said wall, on which the decal is then created. If tid is 0, the tracing is done from the activator of the script.

Parameters

  • tid: The TID of the actor.
  • decalname: The name of the decal to create, as defined in DECALDEF.
  • flags: These can be combined by using the | character:
    • SDF_ABSANGLE  If present, angle is an absolute angle. Otherwise, it is relative to the origin actor's angle.
    • SDF_PERMANENT  If present, the decal will stay indefinitely, and will not be removed if the maximum amount of decals present at once in a level is reached (this is controlled by the cl_maxdecals console variable).
    • SDF_FIXED_ZOFF  If present, zoffset is treated as a fixed-point value rather than an integer.
    • SDF_FIXED_DISTANCE  If present, distance is treated as a fixed-point value rather than an integer.
Default is 0.
  • angle: The direction in which to search for a wall. This is a fixed point angle. Default is 0.
  • zoffset: The offset from the middle of the origin actor for the Z height of the decal. Y-flipped decal will have reverse offset. Default is 0.
  • distance: The maximum distance to search for a wall. Default is 64.

Return value

The return value of the function is the number of decals spawned.

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.