[Closed] [Decorate] A_RadiusGive "Touch Radius" Flag

Moderator: GZDoom Developers

[Decorate] A_RadiusGive "Touch Radius" Flag

Postby NeuralStunner » Sun Jun 23, 2013 10:37 am

So, trying to create a secondary effect for hitscan attacks using A_RadiusGive and a CustomInventory.
Code: Select allExpand view
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
NeuralStunner
not actually a catgirl
 
 
 
Joined: 21 Jul 2009
Location: =o_O=
Discord: NeuralStunner#1293
Operating System: Windows Vista/7/2008 64-bit

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby Nightfall » Tue Jan 14, 2014 2:40 am

Sounds like bugged behavior to me, which shouldn't need a new flag to fix. :?
User avatar
Nightfall
 
Joined: 06 Aug 2009
Location: Finland

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby Major Cooke » Mon Jun 29, 2015 7:10 pm

Try it without inheritance.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby Gez » Tue Jun 30, 2015 2:02 am

What would inheritance change?
Gez
 
 
 
Joined: 06 Jul 2007

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby Major Cooke » Wed Jul 01, 2015 1:37 pm

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
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby NeuralStunner » Wed Jul 01, 2015 8:32 pm

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
NeuralStunner
not actually a catgirl
 
 
 
Joined: 21 Jul 2009
Location: =o_O=
Discord: NeuralStunner#1293
Operating System: Windows Vista/7/2008 64-bit

Re: [Decorate] A_RadiusGive "Touch Radius" Flag

Postby Major Cooke » Thu Jul 02, 2015 12:35 pm

I thought so myself but I made no assumptions. But again, try RGF_NOSIGHT to see if that works for this case.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests