[Decorate] A_RadiusGive "Touch Radius" Flag

Moderator: GZDoom Developers

Post Reply
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

[Decorate] A_RadiusGive "Touch Radius" Flag

Post by NeuralStunner »

So, trying to create a secondary effect for hitscan attacks using [wiki]A_RadiusGive[/wiki] and a CustomInventory.

Code: Select all

Actor StaffPuffEx : StaffPuff2
{
	+NoDamageThrust
	+PuffGetsOwner
	States
	{
	Spawn:
		PUF4 A 0 Bright
		PUF4 A 0 A_RadiusGive ("SS_Staff2Push", 1, RGF_Players|RGF_Monsters|RGF_Objects|RGF_Voodoo|RGF_NoTarget|RGF_Cube, 1)
		Goto Super::Spawn
	}
}
Problem: Nothing is given. If the radius (second option there) is less than the radius of the thing being attacked, the victim doesn't recive the item or gain the added effect. Apparently the function only uses X/Y/Z checks to gather actors in range, the problem with this is that only actors with their origin inside the "area of effect" will recieve the item. (Unlike A_Explode, which it claims to be similar to.)

This suggestion is for an added flag ("RGF_Touch"?) that will actually behave like A_Explode, and give to any eligible actor that is even partially inside the give area. Unsure if this would work with the default "spherical" AOE, if it implies RGF_Cube that's perfectly fine with me.

(And no, I can't "just" use Pain state hacks or anything else that requires editing every actor that could possibly be attacked. This function is supposed to replace that crap.)
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by Nightfall »

Sounds like bugged behavior to me, which shouldn't need a new flag to fix. :?
User avatar
Major Cooke
Posts: 8207
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by Major Cooke »

Try it without inheritance.
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by Gez »

What would inheritance change?
User avatar
Major Cooke
Posts: 8207
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by Major Cooke »

Better yet, NeuralStunner, since you're only trying to give it to the victim of the puff, use one of the HIT* flags. Then just do an A_GiveInventory to whichever you assign it to. That should at least get you rolling along while the issue is investigated.

Or if you want to test a little more thoroughly, use a HIT* flag, and have the puff A_Warp to the pointer, then perform the A_RadiusGive function. I've got a suspicious feeling the actor miiiiiight just be outside the range, maybe?

That, or try RGF_NOSIGHT.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by NeuralStunner »

That was only a usage example, not a "To X I need to Y, how do I Y". The function is stated/implied to work like an explosion (where any actor box partway in the effect radius is affected) but doesn't.
User avatar
Major Cooke
Posts: 8207
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: GZBoomer Town
Contact:

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Post by Major Cooke »

I thought so myself but I made no assumptions. But again, try RGF_NOSIGHT to see if that works for this case.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”