SpawnDecal

From ZDoom Wiki
Jump to: navigation, search

int SpawnDecal (int tid, str decalname, int flags, fixed angle, fixed zoffset, fixed distance); (New from 2.7.1)

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, the 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).
  • angle: The direction in which to search for a wall. Default is 0.0.
  • zoffset: The offset from the middle of the origin actor for the Z height of the decal. Default is 0.0.
  • distance: The maximum distance to search for a wall. Default is 64.0.

Return Value

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

Examples

Nuvolachalk.png 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 contibutions are greatly appreciated.