Activatable Decals

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Enjay
 
 
Posts: 26831
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Activatable Decals

Post by Enjay »

Could activatable decals be added?

At present, the decal thing can be use to place a decal in a map. However, the decal always appears at map initialisation. Even if the decal thing is set to dormant, the decal will spawn.

It would be useful if it was possible to place a decal thing in a map but not have it actually generate a decal until the thing is activated via ACS.

That way, you could make changes to the appearance of an area by spawning bullet holes/rocket scorches, putting posters on the walls, graffiti, whatever, to indicate some change in the area from the last time the player was there.
Jarewill
 
 
Posts: 1849
Joined: Sun Jul 21, 2019 8:54 am

Re: Activatable Decals

Post by Jarewill »

Until someone either adds it or closes this thread, I just wanted to say that you can make it work using ZScript:

Code: Select all

Class ActivatedDecal : Decal{
	Default{+DORMANT; +NOGRAVITY;}
	Override void BeginPlay(){}
	Override void Activate(Actor activator){
		SpawnDecal();
		Destroy();
	}
}
All this does is move the functions from BeginPlay to Activate to make it respond to Thing_Activate in ACS.
User avatar
Enjay
 
 
Posts: 26831
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Activatable Decals

Post by Enjay »

Neat! Thank you very much.

Here's hoping it gets added as an "official" feature, but this will certainly work for me.

Return to “Feature Suggestions [GZDoom]”