Damage Impact

Post your example zscripts/ACS scripts/etc here.

Damage Impact

Postby Hey Doomer » Fri Oct 29, 2021 8:19 am

Another minimalist suggestion... This isn't realistic (unless Hollywood is accurate or one considers lower gravity off-Earth) but creates an opposite partial thrust based on damage, angle of attack, and mass (a monster can be punched out of the way or blown halfway across a room):

Code: Select allExpand view
class di_EventHandler : EventHandler
{
  override
  void WorldThingDamaged(WorldEvent e)
  {
   if (e.thing)
   {
      e.thing.Thrust(e.damage * 0.5 * (100 / e.thing.mass), e.damageangle);
   }
  }
}


The arbitrary 0.5 multiplier seems to work.

It does look a bit silly with infighters skating about. I haven't extensively tested this to see if a player would get stuck in a map from being pushed around by attacks. I suppose that is possible.
Hey Doomer
 
Joined: 25 Sep 2021

Re: Damage Impact

Postby WARCHILD_89 » Fri Dec 03, 2021 7:32 pm

hint: when getting hit by a rocket, the actor always gets blown to the east, no matter from which side he gets hit.
User avatar
WARCHILD_89
DOOM NEMESIS / 3D MODELS /MODELPACK PROVIDER
 
Joined: 17 Nov 2013
Location: MIA between doomed dimensions
Operating System: Windows Vista/7/2008 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Damage Impact

Postby Hey Doomer » Sun Dec 05, 2021 3:56 pm

WARCHILD_89 wrote:hint: when getting hit by a rocket, the actor always gets blown to the east, no matter from which side he gets hit.


Hmm. I wonder, is that a bug? Not sure.
Hey Doomer
 
Joined: 25 Sep 2021


Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests