header general

Radiation [SUBMISSION]

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
7 years 10 months ago #11 by Blue Shadow
Replied by Blue Shadow on topic Radiation [SUBMISSION]

HexenMapper wrote: Another problem I foresee with a radius attack, is that if 2 players are close, 2 radius attacks will be performed, and both will take double damage.

No. For each call of A_Explode, all eligible actors for damaging in radius are damaged once. So that's not actually a problem.

Could work, and should be able to use something like A_GiveToTarget instead of having to worry about different types of attack.

That has the same inherent problem as the melee attack method; only one actor would be damaged, which is the target.

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 10 months ago #12 by MagicWazard
Replied by MagicWazard on topic Radiation [SUBMISSION]
Why even have a target? A_Explode damages everything nearby regardless of whether there's a target or not. You can have the radiation cloud actor perform this every so often without needing to look for a target. Or, for inventory, you could use A_RadiusGive, which works off the same no-target principle.

Please Log in or Create an account to join the conversation.

  • HexenMapper
  • HexenMapper's Avatar Topic Author
  • Dark Imp
  • Dark Imp
More
7 years 7 months ago #13 by HexenMapper
Replied by HexenMapper on topic Radiation [SUBMISSION]
ok so I tried A_Explode and it seems to work, but doesn't allow for a damage type (even though the wiki says it does) I tried the correct A_Explode function with the damage type specified with the latest gzdoom version and it runs, but with a bunch of errors, and no longer inflicts damage...

So I think A_RadiusGive might be my best bet, question is: which action function should I use for the item to damage the person who has the item?

Something like

Actor LOWRADS
{
States
{
Spawn: (Would I use a spawn state?)
TNT1 A 30 (ACTION FUNCTION TO HARM WHOEVER HAS IT)
}
}

Cheers for the help, its been a while since I've had time to work on this

Please Log in or Create an account to join the conversation.

  • HexenMapper
  • HexenMapper's Avatar Topic Author
  • Dark Imp
  • Dark Imp
More
7 years 7 months ago #14 by HexenMapper
Replied by HexenMapper on topic Radiation [SUBMISSION]
I've made some progress, using A_RadiusGive to give out an item that inflicts damage with A_DamageSelf.
The only problem is getting the obituary right (and I still have some tweaking to get the damage and timing feeling right)

No matter what I try the obituary seems to be "player killed themselves" instead of the obituary I want.

Here's the current progress, and a test map:
http://www.m*diafire.com/file/kvv1r2jel2jpu1h/RADIATION_8.wad

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
7 years 7 months ago - 7 years 7 months ago #15 by Blue Shadow
Replied by Blue Shadow on topic Radiation [SUBMISSION]
Change the A_DamageSelf call to this:
Code:
A_DamageSelf(1, "RADS", 0, "None", "None", AAPTR_NULL, AAPTR_NULL)
The important thing here is to null the source and inflictor of the damage.

Create a MAPINFO lump and put the RADS damage type's definition in it (remove the one that you have in DECORATE):
Code:
DamageType RADS { Factor = 1.0 Obituary = "%o received a fatal dose of radiation" }


[strike]As a side note: I think your code needs optimization or something. Using GZDoom 3.0, I experienced two moments of slowdown/lag, one when I got in range of the radiations and another when I got damaged by said radiations.[/strike]

Edit: Nevermind the lag issue above. It turned out it's just the sounds being loaded for the first time.
Last edit: 7 years 7 months ago by Blue Shadow.

Please Log in or Create an account to join the conversation.

  • HexenMapper
  • HexenMapper's Avatar Topic Author
  • Dark Imp
  • Dark Imp
More
7 years 7 months ago #16 by HexenMapper
Replied by HexenMapper on topic Radiation [SUBMISSION]
Amazing, thanks, I'll have a go at that :)

Please Log in or Create an account to join the conversation.

  • HexenMapper
  • HexenMapper's Avatar Topic Author
  • Dark Imp
  • Dark Imp
More
7 years 7 months ago - 7 years 7 months ago #17 by HexenMapper
Replied by HexenMapper on topic Radiation [SUBMISSION]
Well that worked very well, and I've tweaked the timing and damage to be more correct.

I think its pretty much finished! ('final' .zip file is attached)
Attachments:
Last edit: 7 years 7 months ago by HexenMapper.

Please Log in or Create an account to join the conversation.

  • Blue Shadow
  • Blue Shadow's Avatar
  • Administrator
  • Administrator
More
7 years 7 months ago #18 by Blue Shadow
Replied by Blue Shadow on topic Radiation [SUBMISSION]
I'd suggest you add the RGF_NOSIGHT flag to the A_RadiusGive calls so as to fix the "not receiving damage behind corners" issue I mentioned before.

Please Log in or Create an account to join the conversation.

  • HexenMapper
  • HexenMapper's Avatar Topic Author
  • Dark Imp
  • Dark Imp
More
7 years 7 months ago #19 by HexenMapper
Replied by HexenMapper on topic Radiation [SUBMISSION]
Ah yep nice, here's the modified file (attached)
Attachments:

Please Log in or Create an account to join the conversation.

  • MagicWazard
  • MagicWazard's Avatar
  • Moderator
  • Moderator
More
7 years 7 months ago #20 by MagicWazard
Replied by MagicWazard on topic Radiation [SUBMISSION]
Seems to work pretty well now! And the modified rad suit mitigates the damage, too, which is a nice touch which keeps things consistent. :)

Please Log in or Create an account to join the conversation.