[DEC/ACS] A_RadiusGive - keep track of who gave the item?

Mon Feb 14, 2022 8:22 am

Hi,

Right now, I'm using A_RadiusGive to give enemies a CustomInventory item, which in its pickup state, spawns an actor that warps to the enemy every other tic and explodes with a small radius, to give the idea the enemy is on fire.
However, right now I want to keep track of who it was that set the enemy on fire. Is something like this even possible with A_RadiusGive?

Reason I want to do this is so I can play a soundbyte if the player has set more than, say, 3 enemies on fire at the same time.

Re: [DEC/ACS] A_RadiusGive - keep track of who gave the item

Mon Feb 14, 2022 8:33 am

I don't know if it's possible with A_RadiusGive, but with ZScript you can replace that with BlockThingsIterator.
You can give the enemies the item using that and access it to set the player as the item's pointer for example.
Then you could access the player from the item.

Alternate idea: Instead of setting the player as the item's pointer, you could instead add every enemy set ablaze to the projectile's array.
Then if the array is bigger than a certain number you can access the projectile's target and play the sound.

Re: [DEC/ACS] A_RadiusGive - keep track of who gave the item

Mon Feb 14, 2022 8:46 am

I'm developing for Zandro so I can't use ZScript

Re: [DEC/ACS] A_RadiusGive - keep track of who gave the item

Mon Feb 14, 2022 9:37 am

Recurracy wrote:I'm developing for Zandro so I can't use ZScript

People really need to state this more often when it applies. It is not unreasonable on this forum to assume that a modder has access to up to date GZDoom features. There are probably hundreds of posts on the forum where someone has tried to give help only to receive a "no can do, using Zandro" reply.

Re: [DEC/ACS] A_RadiusGive - keep track of who gave the item

Mon Feb 14, 2022 10:52 am

I wrongly assumed that by putting [DEC/ACS] in the thread title it would imply I can only use decorate or acs

Re: [DEC/ACS] A_RadiusGive - keep track of who gave the item

Mon Feb 14, 2022 1:31 pm

Don't worry, it's not a dig at you particularly. Yours just happens to be the post that I finally responded to on this matter.

Specifying DEC/ACS does, of course, help but if you specify Zandro, then everyone knows it's not merely a preference.