Customized PoisonCloud

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Kzer-Za
Posts: 521
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Customized PoisonCloud

Post by Kzer-Za »

I'm trying to make a version of PoisonCloud. Actually, I'm doing it for Heretic, for explosive pods to spawn in their pain state. Mostly I'm done, but I have several questions.

First of all, it doesn't deal any damage if I don't include "DamageFunction 0;" in it:

Code: Select all

Class HLPodPoisonCloud : Actor
{
Default
{
	Radius 20;
	Height 30;
	Mass 0;
	Scale 0.8;
	Reactiontime 35;
	Speed 0;
	+MISSILE;
	-SOLID;
	-NOBLOCKMAP;
	+FORCEXYBILLBOARD;
	+NOGRAVITY;
	+NODAMAGETHRUST;
	+DONTSPLASH;
	+CANBLAST;
	+BLOODLESSIMPACT;
	+ADDITIVEPOISONDURATION;
	RenderStyle "Translucent";
	Alpha 0.6;
	DeathSound "PoisonShroomDeath";
	PoisonDamage 5, 6;
	DamageFunction 0; // with it the poison is applied, without it nothing happens
}	
	States
	{
	Spawn: // PSBG
		TNT1 A 0 A_Scream;
		SMOC DEF 3;
	Float:
		TNT1 A 0 A_Scream;
		SMOC DEFGHI 5 A_Countdown;
		Loop;
	Death:
		SMOC HG 5;
		SMOC FD 5;
		Stop;
	}
}
Is it supposed to not work without "DamageFunction 0;"?

Second, the green filter is not applied on the screen, and while I was spawning the original PoisonCloud, the screen was becoming tinted with green for the duration of the poison.

Third, I don't know if it's possible, but can the duration of the poisoning be added from the same cloud, depending on how long you are standing in it? ADDITIVEPOISONDURATION that I included works with two or more different clouds, but is it possible to add extra duration for every second you keep standing within one cloud?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Customized PoisonCloud

Post by Graf Zahl »

The original poison cloud contains quite a bit of script code. You cannot really replicate its functions without that code.
Kzer-Za
Posts: 521
Joined: Sat Aug 19, 2017 11:52 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: Customized PoisonCloud

Post by Kzer-Za »

Where can I take a look at it? I took a look here: https://github.com/coelckers/gzdoom/tre ... ript/hexen but couldn't find it.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Customized PoisonCloud

Post by Graf Zahl »

It's in "flechette.txt".
Post Reply

Return to “Scripting”