how to make a wide melee swing?

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.

how to make a wide melee swing?

Postby Lagi » Fri Nov 20, 2020 1:23 pm

I have a sword weapon.

I would like this sword to hit every enemy in some arch.




By now im simulating this by shooting mulitple projectiles, but this solution is not good, because
  • I cannot hit more monsters,
  • monster in front blocking the monster behind.
  • there are gap between projectile (blue golem will not be hit)
  • i can hit 1x monster with multiple projectile, if stand close, which screw the control of damage dealt


Spoiler:
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: how to make a wide melee swing?

Postby Jarewill » Fri Nov 20, 2020 3:34 pm

You could try using A_RailAttack to fire a few hitscan attacks in an arc that can pierce enemies.
spread_xy and spread_z parameters with the RGF_EXPLICITANGLE flag should work for angles.

It's not perfect, but might be better than projectiles.
Maybe someone else will know of a better way.
Jarewill
 
 
 
Joined: 21 Jul 2019

Re: how to make a wide melee swing?

Postby wildweasel » Fri Nov 20, 2020 3:52 pm

I had meant to experiment with using BFG sprays to mimic this effect. Never got around to trying it, but it might be worth looking into.
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: how to make a wide melee swing?

Postby Dan_The_Noob » Fri Nov 20, 2020 7:44 pm

maybe make a couple massive low-damage ripper projectiles that last for a few frames.
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: how to make a wide melee swing?

Postby Lagi » Sat Nov 21, 2020 3:30 am

thanks,

railattack point me to the explosion.

making multiple projectiles, result in hitting one target multiple times, when you stand touching one monster. Its bad because i have OP close weapon, and pathetic weak area damaging.

excuse my ignorance, but I skip the BFG research.

i think i would create circle explosion


"not great, not terrible"
-Dyatlov
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: how to make a wide melee swing?

Postby Dan_The_Noob » Sat Nov 21, 2020 2:20 pm

BFGSpray would probably be your best bet.

https://zdoom.org/wiki/A_BFGSpray

if you aren't limited to zandronum you can set the angle, range, height etc. to your liking.
User avatar
Dan_The_Noob
 
Joined: 07 May 2019
Twitch ID: Dan_The_Noob
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: nVidia with Vulkan support

Re: how to make a wide melee swing?

Postby Lagi » Sun Jan 24, 2021 10:06 am

https://doomwiki.org/wiki/BFG9000

nah.. looks like the rays are separate attacks penetrating targets. I dont want to hurt single target with multiple rays. plus the bfg behavior is very odd, i need to shoot some projectile and then it spawn rays from player?
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence

Re: how to make a wide melee swing?

Postby eharper256 » Sun Jan 24, 2021 7:11 pm

There is a janky method: Use A_SpawnItemEx to create invisible objects at various calculated points around the player, and have the objects immediately enter their death state and explode, and tada, you have an arc of damage. Has problems though:
A) Its lumpy in shape.
B) It may have overlapping areas if you don't perfectly calculate the explosion radii.
C) It might fail to spawn in walls and telefrag itself even with NOCLIP set.
So yeah. I used to use a similar thing for the vorpal slashes in Walpurgis, but its a bit finicky and caused the whole shenigans with not working in tight spaces very well.

BFG's are also fine for arcs and cones, though, just use an invisible projectile with 5000 or more speed and an instant death state triggering the blast.
User avatar
eharper256
 
Joined: 25 Feb 2018
Location: UK

Re: how to make a wide melee swing?

Postby Lagi » Mon Jan 25, 2021 2:51 am

Thanks harper,
this is what i done. I just use single exploasion cause im lazy.

With single explosion, its not so great beacuse the swing feel its deeper than it should (but at least there is no damage overlapping).


i use this. You need to launch both files.

i create monster Radius 50, and kill him.
this is monster corpse box of radius 50, so the box lenght is 100 = this i find to be optimal melee range, or explosion radius.
this is handy in measuring area of effects for many things.
User avatar
Lagi
 
Joined: 23 Jun 2018
Location: Thou shalt alter thy beliefs with new evidence


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests