Skip to content

[NeedHelp] Not possible to spawn a decal dynamically? #500

Open
@joleman11

Description

@joleman11

Non-working pseudocode:

CProjectedDecal decalEnt = Utilities.CreateEntityByName<CProjectedDecal>("info_projecteddecal");
decalEnt.Texture = 0 // How do you get/set the texture id?
decalEnt.Distance = 64.0f;
decalEnt.Teleport(
    new Vector(
        pawn!.AbsOrigin!.X,
        pawn!.AbsOrigin!.Y,
        pawn!.AbsOrigin!.Z
    ),
    pawn!.EyeAngles,
    new Vector(0.0f, 0.0f, 0.0f)
);
decalEnt.DispatchSpawn(); // Crashes server instantly
decalEnt.AcceptInput("Activate"); // Needed in the hammer editor for the decal to appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedNew issue has not been triaged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions