int SpawnDecal (int tid, str decalname, int flags, fixed angle, fixed zoffset, fixed distance);
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.
- 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 (fixed point angle).
- zoffset: The offset from the middle of the origin actor for the Z height of the decal. Default is 0 (integer). Y-flipped decal will have reverse offset.
- distance: The maximum distance to search for a wall. Default is 64 (integer).
The return value of the function is the number of decals spawned.
|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. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated.|