Use A_RadiusThrust on a puff so it doesn't affect the player

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
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Use A_RadiusThrust on a puff so it doesn't affect the player

Post by Jekyll Grim Payne »

Is it possible to use A_RadiusThrust on a puff (produced by a melee attack) in such a way that the player who used the melee attack isn't affected? By default they are.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Use A_RadiusThrust on a puff so it doesn't affect the pl

Post by Arctangent »

Either set the flags parameter to 0, or don't include RTF_AFFECTSOURCE if you've got other flags defined.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Use A_RadiusThrust on a puff so it doesn't affect the pl

Post by Jekyll Grim Payne »

Arctangent wrote:Either set the flags parameter to 0, or don't include RTF_AFFECTSOURCE if you've got other flags defined.
This is true for projectiles. I doesn't work on puffs.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Use A_RadiusThrust on a puff so it doesn't affect the pl

Post by Arctangent »

A_RadiusThrust, like A_Explode, is designed to work on projectiles, yes, but all that means is that if you want to track the source of the effect, you need to set the calling actor's target to that source. So, you'll want +PUFFGETSOWNER, which does exactly that.
User avatar
Jekyll Grim Payne
 
 
Posts: 1065
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Use A_RadiusThrust on a puff so it doesn't affect the pl

Post by Jekyll Grim Payne »

Arctangent wrote:A_RadiusThrust, like A_Explode, is designed to work on projectiles, yes, but all that means is that if you want to track the source of the effect, you need to set the calling actor's target to that source. So, you'll want +PUFFGETSOWNER, which does exactly that.
I completely forgot about this. Thanks!
Post Reply

Return to “Scripting”