Several questions regarding a +RIPPER projectile

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!)
User avatar
DamTheGreat
Posts: 77
Joined: Mon Oct 26, 2020 6:40 pm
Discord: ☠DamTheGreat☠#7201
Graphics Processor: nVidia with Vulkan support
Location: Luxembourg

Several questions regarding a +RIPPER projectile

Post by DamTheGreat »

I've got a gas cloud with the +RIPPER flag. I want it to color the player's screen green and it to slow down while the player is inside its radius. I need a check for collision so the screen turns back colorless and the projectile returns to its original speed when the player leaves its radius. Is there such a check?

Also, where in ZScript do you define an actor's special? I want to use +BUMPSPECIAL with ACS_Execute, but copious amounts of googling didn't tell me where I define said special. Furthermore, can I put the script it executes inside the ZScript lump?

Sorry for all these noobish questions, I'm just an idiot with WAY too ambitious ideas...
User avatar
Blue Shadow
Posts: 4903
Joined: Sun Nov 14, 2010 12:59 am
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Several questions regarding a +RIPPER projectile

Post by Blue Shadow »

DamTheGreat wrote:Also, where in ZScript do you define an actor's special? I want to use +BUMPSPECIAL with ACS_Execute, but copious amounts of googling didn't tell me where I define said special.
Upon the actor's spawn call [wiki]A_SetSpecial[/wiki].
Furthermore, can I put the script it executes inside the ZScript lump?
No, you can't. ACS scripts go into ACS.
User avatar
DamTheGreat
Posts: 77
Joined: Mon Oct 26, 2020 6:40 pm
Discord: ☠DamTheGreat☠#7201
Graphics Processor: nVidia with Vulkan support
Location: Luxembourg

Re: Several questions regarding a +RIPPER projectile

Post by DamTheGreat »

DamTheGreat wrote:I've got a gas cloud with the +RIPPER flag. I want it to color the player's screen green and it to slow down while the player is inside its radius. I need a check for collision so the screen turns back colorless and the projectile returns to its original speed when the player leaves its radius. Is there such a check?

Also, where in ZScript do you define an actor's special? I want to use +BUMPSPECIAL with ACS_Execute, but copious amounts of googling didn't tell me where I define said special. Furthermore, can I put the script it executes inside the ZScript lump?

Sorry for all these noobish questions, I'm just an idiot with WAY too ambitious ideas...

I have a better idea for the green screen effect: how do I override the default red flash upon taking damage? That way I don't need an ACS script. Also, forget about the slowing down thing, as the projectile is pretty slow to begin with...
User avatar
Virathas
Posts: 220
Joined: Thu Aug 10, 2017 9:38 am

Re: Several questions regarding a +RIPPER projectile

Post by Virathas »

For a simple, probably a little hacky way to give a green tint, you can simply give the player a powerup that has such a green tint. An example of such a powerup:

Code: Select all

class GreenTinter : PowerupGiver
{
	Default
	{
		+INVENTORY.AUTOACTIVATE
		+INVENTORY.ALWAYSPICKUP
		Inventory.MaxAmount 0;
		Powerup.Type "PowerGreenTint";
	}

}
class PowerGreenTint : Powerup
{
	Default
	{
		Powerup.Duration -1;
		Powerup.Color "00 ff 00", 0.125;
	}
	override bool isBlinking() const
	{
		return false;
	}
}
When given, this powerup will give a green mask, the same as with radiation suit, for 1 second. You can use this as a base for what you need.

Return to “Scripting”